[cfe-commits] r69205 - in /cfe/trunk: lib/CodeGen/CGObjCMac.cpp test/CodeGenObjC/metadata-symbols-64.m test/CodeGenObjC/synthesize_ivar-cont-class.m

Daniel Dunbar daniel at zuster.org
Wed Apr 15 12:52:32 PDT 2009


Author: ddunbar
Date: Wed Apr 15 14:52:32 2009
New Revision: 69205

URL: http://llvm.org/viewvc/llvm-project?rev=69205&view=rev
Log:
Don't use \01 in symbol name if unnecessary.
 - This was particularly bad since I fixed one instance of this name
   and not another, meaning we got an LLVM module with the same
   effective name in two different globals!

Modified:
    cfe/trunk/lib/CodeGen/CGObjCMac.cpp
    cfe/trunk/test/CodeGenObjC/metadata-symbols-64.m
    cfe/trunk/test/CodeGenObjC/synthesize_ivar-cont-class.m

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

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Wed Apr 15 14:52:32 2009
@@ -4505,7 +4505,7 @@
                                               unsigned long int Offset) {
   
   assert(ID && "EmitIvarOffsetVar - null interface decl.");
-  std::string ExternalName("\01_OBJC_IVAR_$_" + ID->getNameAsString() + '.' 
+  std::string ExternalName("OBJC_IVAR_$_" + ID->getNameAsString() + '.' 
                            + Ivar->getNameAsString());
   llvm::Constant *Init = llvm::ConstantInt::get(ObjCTypes.LongTy, Offset);
   llvm::GlobalVariable *IvarOffsetGV = 

Modified: cfe/trunk/test/CodeGenObjC/metadata-symbols-64.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/metadata-symbols-64.m?rev=69205&r1=69204&r2=69205&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenObjC/metadata-symbols-64.m (original)
+++ cfe/trunk/test/CodeGenObjC/metadata-symbols-64.m Wed Apr 15 14:52:32 2009
@@ -3,11 +3,7 @@
 
 // RUN: grep '@"OBJC_CLASS_$_A" = global' %t &&
 // RUN: grep '@"OBJC_CLASS_$_B" = external global' %t &&
-
-// FIXME: This is currently broken in clang, we are emitting two
-// references to the same ivar (one using \01, and one not).
-// RUNX: grep '@"OBJC_IVAR_$_A._ivar" = global .* section "__DATA, __objc_const", align 8' %t &&
-
+// RUN: grep '@"OBJC_IVAR_$_A._ivar" = global .* section "__DATA, __objc_const", align 8' %t &&
 // RUN: grep '@"OBJC_METACLASS_$_A" = global .* section "__DATA, __objc_data", align 8' %t &&
 // RUN: grep '@"\\01L_OBJC_CLASSLIST_REFERENCES_$_[0-9]*" = internal global .* section "__DATA, __objc_classrefs, regular, no_dead_strip", align 8' %t &&
 // RUN: grep '@"\\01L_OBJC_CLASSLIST_SUP_REFS_$_[0-9]*" = internal global .* section "__DATA, __objc_superrefs, regular, no_dead_strip", align 8' %t | count 2 &&

Modified: cfe/trunk/test/CodeGenObjC/synthesize_ivar-cont-class.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/synthesize_ivar-cont-class.m?rev=69205&r1=69204&r2=69205&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenObjC/synthesize_ivar-cont-class.m (original)
+++ cfe/trunk/test/CodeGenObjC/synthesize_ivar-cont-class.m Wed Apr 15 14:52:32 2009
@@ -1,5 +1,5 @@
 // RUN: clang-cc -triple x86_64-apple-darwin10 -emit-llvm -o %t %s &&
-// RUN: grep '_OBJC_IVAR_$_XCOrganizerDeviceNodeInfo.viewController' %t
+// RUN: grep '@"OBJC_IVAR_$_XCOrganizerDeviceNodeInfo.viewController"' %t
 
 @interface XCOrganizerNodeInfo
 @property (readonly, retain) id viewController;





More information about the cfe-commits mailing list