]> granicus.if.org Git - clang/commitdiff
Don't add isa with @defs only to work around it in the code generator, patch
authorChris Lattner <sabre@nondot.org>
Sat, 21 Jun 2008 21:37:25 +0000 (21:37 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 21 Jun 2008 21:37:25 +0000 (21:37 +0000)
by David Chisnall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52597 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenTypes.cpp
lib/Sema/SemaDecl.cpp

index 7dfa2f850c6b784f32146722cf158ce27f1a1bde..9074e8179c0467f660c1a00ee4a965bbf33cba67 100644 (file)
@@ -309,10 +309,6 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) {
     // 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);
   }
index ee1aad54ed099549e9966e23a28dabb8d147bfd0..c2874106f4e400baacea51fb443c6e16a049b2d5 100644 (file)
@@ -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);
 }