-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
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index 980717f..3861d04 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -57,7 +57,7 @@
PushOnScopeChains(IDecl, TUScope);
// Synthesize "typedef struct objc_selector *SEL;"
- RecordDecl *SelTag = RecordDecl::Create(Context, Decl::Struct, CurContext,
+ RecordDecl *SelTag = RecordDecl::Create(Context, TagDecl::TK_struct, CurContext,
SourceLocation(),
&Context.Idents.get("objc_selector"),
0);
@@ -98,7 +98,7 @@
TranslationUnitDecl *TUDecl = Context.getTranslationUnitDecl();
// Synthesize "typedef struct objc_class *Class;"
- RecordDecl *ClassTag = RecordDecl::Create(Context, Decl::Struct,
+ RecordDecl *ClassTag = RecordDecl::Create(Context, TagDecl::TK_struct,
TUDecl,
SourceLocation(),
&IT.get("objc_class"), 0);
@@ -117,7 +117,7 @@
// Synthesize "typedef struct objc_object { Class isa; } *id;"
RecordDecl *ObjectTag =
- RecordDecl::Create(Context, Decl::Struct, TUDecl,
+ RecordDecl::Create(Context, TagDecl::TK_struct, TUDecl,
SourceLocation(),
&IT.get("objc_object"), 0);
FieldDecl *IsaDecl = FieldDecl::Create(Context, SourceLocation(),