]> granicus.if.org Git - clang/commitdiff
IRgen/NeXT: Put the synthesized _objc_super, _message_ref_t decls in a valid DeclCont...
authorDaniel Dunbar <daniel@zuster.org>
Thu, 29 Apr 2010 16:29:11 +0000 (16:29 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 29 Apr 2010 16:29:11 +0000 (16:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102624 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCMac.cpp

index fdb9d0759a978c9d7c933c45f2a2fd1490c4890d..77eabbfd4141f4dcc2e619c95a3e0c488874fdb1 100644 (file)
@@ -3669,7 +3669,8 @@ ObjCCommonTypesHelper::ObjCCommonTypesHelper(CodeGen::CodeGenModule &cgm)
   //   id self;
   //   Class cls;
   // }
-  RecordDecl *RD = RecordDecl::Create(Ctx, TagDecl::TK_struct, 0,
+  RecordDecl *RD = RecordDecl::Create(Ctx, TagDecl::TK_struct,
+                                      Ctx.getTranslationUnitDecl(),
                                       SourceLocation(),
                                       &Ctx.Idents.get("_objc_super"));
   RD->addDecl(FieldDecl::Create(Ctx, RD, SourceLocation(), 0,
@@ -4130,7 +4131,8 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(CodeGen::CodeGenModul
   // };
 
   // First the clang type for struct _message_ref_t
-  RecordDecl *RD = RecordDecl::Create(Ctx, TagDecl::TK_struct, 0,
+  RecordDecl *RD = RecordDecl::Create(Ctx, TagDecl::TK_struct,
+                                      Ctx.getTranslationUnitDecl(),
                                       SourceLocation(),
                                       &Ctx.Idents.get("_message_ref_t"));
   RD->addDecl(FieldDecl::Create(Ctx, RD, SourceLocation(), 0,