aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenTypes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
-rw-r--r--lib/CodeGen/CodeGenTypes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp
index d9c9cb1336..ff89341ddc 100644
--- a/lib/CodeGen/CodeGenTypes.cpp
+++ b/lib/CodeGen/CodeGenTypes.cpp
@@ -392,7 +392,7 @@ const llvm::Type *CodeGenTypes::ConvertTagDeclType(const TagDecl *TD) {
} else if (TD->isUnion()) {
// Just use the largest element of the union, breaking ties with the
// highest aligned member.
- if (RD->field_begin() != RD->field_end()) {
+ if (!RD->field_empty()) {
RecordOrganizer RO(*this, *RD);
RO.layoutUnionFields(Context.getASTRecordLayout(RD));