[cfe-commits] r62708 - /cfe/trunk/lib/CodeGen/CGObjCGNU.cpp

Chris Lattner sabre at nondot.org
Wed Jan 21 11:37:47 PST 2009


Author: lattner
Date: Wed Jan 21 13:37:47 2009
New Revision: 62708

URL: http://llvm.org/viewvc/llvm-project?rev=62708&view=rev
Log:
revert the gnu objc patches, they regress codegen-gnu.m

Modified:
    cfe/trunk/lib/CodeGen/CGObjCGNU.cpp

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

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Wed Jan 21 13:37:47 2009
@@ -40,8 +40,8 @@
 private:
   CodeGen::CodeGenModule &CGM;
   llvm::Module &TheModule;
-  const llvm::PointerType *SelectorTy;
-  const llvm::Type *ExpectedSelTy;
+  const llvm::StructType *SelStructTy;
+  const llvm::Type *SelectorTy;
   const llvm::Type *PtrToInt8Ty;
   const llvm::Type *IMPTy;
   const llvm::Type *IdTy;
@@ -168,12 +168,11 @@
   PtrToInt8Ty = 
     llvm::PointerType::getUnqual(llvm::Type::Int8Ty);
   // Get the selector Type.
-  SelectorTy = cast<llvm::PointerType>(
-	  CGM.getTypes().ConvertType(CGM.getContext().getObjCSelType()));
-
-  ExpectedSelTy = 
-    CGM.getTypes().ConvertType(CGM.getContext().getObjCSelType());
-
+  SelStructTy = llvm::StructType::get(
+      PtrToInt8Ty,
+      PtrToInt8Ty,
+      NULL);
+  SelectorTy = llvm::PointerType::getUnqual(SelStructTy);
   PtrToIntTy = llvm::PointerType::getUnqual(IntTy);
   PtrTy = PtrToInt8Ty;
  
@@ -798,9 +797,6 @@
       UntypedSelectors.empty())
     return NULL;
 
-  const llvm::StructType *SelStructTy = 
-    cast<llvm::StructType>(SelectorTy->getElementType());
-
   // Name the ObjC types to make the IR a bit easier to read
   TheModule.addTypeName(".objc_selector", SelectorTy);
   TheModule.addTypeName(".objc_id", IdTy);





More information about the cfe-commits mailing list