From 18ae3cfe2a3ba43519ccd2f665892014c64e8d4a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 21 Jun 2008 21:37:25 +0000 Subject: [PATCH] Don't add isa with @defs only to work around it in the code generator, patch by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52597 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenTypes.cpp | 4 ---- lib/Sema/SemaDecl.cpp | 4 ---- 2 files changed, 8 deletions(-) diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index 7dfa2f850c..9074e8179c 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/lib/CodeGen/CodeGenTypes.cpp @@ -309,10 +309,6 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) { // late-bound ivars. ObjCInterfaceType OIT = cast(Ty); std::vector IvarTypes; - // Pointer to the class. This is just a placeholder. Operations that - // actually use the isa pointer should cast it to the Class type provided - // by the runtime. - IvarTypes.push_back(llvm::PointerType::getUnqual(llvm::Type::Int8Ty)); CollectObjCIvarTypes(OIT.getDecl(), IvarTypes); return llvm::StructType::get(IvarTypes); } diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index ee1aad54ed..c2874106f4 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -1751,10 +1751,6 @@ void Sema::ActOnDefs(Scope *S, SourceLocation DeclStart, Diag(DeclStart, diag::err_undef_interface, ClassName->getName()); return; } - // Add the isa pointer - Decls.push_back(FieldDecl::Create(Context, SourceLocation(), - &Context.Idents.get("isa"), - Context.getObjCClassType())); // Collect the instance variables CollectIvars(Class, Decls); } -- 2.40.0