aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenTypes.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-10-07 06:10:15 +0000
committerJohn McCall <rjmccall@apple.com>2011-10-07 06:10:15 +0000
commit5e1cdac63c3d9c9b32fa41fa0b2d242a58a20d49 (patch)
tree4315635ba5c4741bce2150f06e162dd4ca99b98a /lib/CodeGen/CodeGenTypes.cpp
parent856ebfb6357042d46052ccb39c1fbb490718320e (diff)
Rename TagDecl::isDefinition -> isCompleteDefinition
for better self-documenting code, since the semantics are subtly different from getDefinition(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141355 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
-rw-r--r--lib/CodeGen/CodeGenTypes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp
index 31aed99825..03a15ae67e 100644
--- a/lib/CodeGen/CodeGenTypes.cpp
+++ b/lib/CodeGen/CodeGenTypes.cpp
@@ -526,7 +526,7 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) {
case Type::Enum: {
const EnumDecl *ED = cast<EnumType>(Ty)->getDecl();
- if (ED->isDefinition() || ED->isFixed())
+ if (ED->isCompleteDefinition() || ED->isFixed())
return ConvertType(ED->getIntegerType());
// Return a placeholder 'i32' type. This can be changed later when the
// type is defined (see UpdateCompletedType), but is likely to be the
@@ -579,7 +579,7 @@ llvm::StructType *CodeGenTypes::ConvertRecordDeclType(const RecordDecl *RD) {
// If this is still a forward declaration, or the LLVM type is already
// complete, there's nothing more to do.
RD = RD->getDefinition();
- if (RD == 0 || !RD->isDefinition() || !Ty->isOpaque())
+ if (RD == 0 || !RD->isCompleteDefinition() || !Ty->isOpaque())
return Ty;
// If converting this type would cause us to infinitely loop, don't do it!