diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-06-09 23:19:58 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-06-09 23:19:58 +0000 |
commit | 39ba4aeca296b1c9f04bde7d9d3cbbf129f1abd3 (patch) | |
tree | 0bd41bdbfdd41514deb4fbd92ddf3bade3030d8b /lib/CodeGen/CodeGenTypes.cpp | |
parent | d3bb44f0f1a83cb208d3e61ee80afe6a4d20d2d8 (diff) |
-Changes to TagDecl:
Added TagKind enum.
Added getTagKind() method.
Added convenience methods: isEnum(), isStruct(), isUnion(), isClass().
-RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52160 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenTypes.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index bab5a21a6a..2f8784f7d5 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/lib/CodeGen/CodeGenTypes.cpp @@ -375,7 +375,7 @@ const llvm::Type *CodeGenTypes::ConvertTagDeclType(const TagDecl *TD) { // Okay, this is a definition of a type. Compile the implementation now. - if (TD->getKind() == Decl::Enum) { + if (TD->isEnum()) { // Don't bother storing enums in TagDeclTypes. return ConvertTypeRecursive(cast<EnumDecl>(TD)->getIntegerType()); } @@ -391,7 +391,7 @@ const llvm::Type *CodeGenTypes::ConvertTagDeclType(const TagDecl *TD) { const llvm::Type *ResultType; const RecordDecl *RD = cast<const RecordDecl>(TD); - if (TD->getKind() == Decl::Struct || TD->getKind() == Decl::Class) { + if (TD->isStruct() || TD->isClass()) { // Layout fields. RecordOrganizer RO(*this, *RD); @@ -402,7 +402,7 @@ const llvm::Type *CodeGenTypes::ConvertTagDeclType(const TagDecl *TD) { RO.getPaddingFields()); ResultType = RO.getLLVMType(); - } else if (TD->getKind() == Decl::Union) { + } else if (TD->isUnion()) { // Just use the largest element of the union, breaking ties with the // highest aligned member. if (RD->getNumMembers() != 0) { |