[cfe-commits] r52597 - in /cfe/trunk/lib: CodeGen/CodeGenTypes.cpp Sema/SemaDecl.cpp

Chris Lattner sabre at nondot.org
Sat Jun 21 14:37:25 PDT 2008


Author: lattner
Date: Sat Jun 21 16:37:25 2008
New Revision: 52597

URL: http://llvm.org/viewvc/llvm-project?rev=52597&view=rev
Log:
Don't add isa with @defs only to work around it in the code generator, patch
by David Chisnall. 

Modified:
    cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
    cfe/trunk/lib/Sema/SemaDecl.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=52597&r1=52596&r2=52597&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Sat Jun 21 16:37:25 2008
@@ -309,10 +309,6 @@
     // late-bound ivars.
     ObjCInterfaceType OIT = cast<ObjCInterfaceType>(Ty);
     std::vector<const llvm::Type*> 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);
   }

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=52597&r1=52596&r2=52597&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Sat Jun 21 16:37:25 2008
@@ -1751,10 +1751,6 @@
     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);
 }





More information about the cfe-commits mailing list