aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-15 19:52:32 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-15 19:52:32 +0000
commit7595fb1418243ac715d729b4dc62d995a7a1d5a5 (patch)
tree86a91ea8a5aeff0d30ec3cc022e5610d26da1b63
parentcd9c51433c06705645d1ee5a13da3c9a72d7d025 (diff)
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! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69205 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGObjCMac.cpp2
-rw-r--r--test/CodeGenObjC/metadata-symbols-64.m6
-rw-r--r--test/CodeGenObjC/synthesize_ivar-cont-class.m2
3 files changed, 3 insertions, 7 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index 90ef11e55a..629ea80945 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -4505,7 +4505,7 @@ llvm::Constant * CGObjCNonFragileABIMac::EmitIvarOffsetVar(
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 =
diff --git a/test/CodeGenObjC/metadata-symbols-64.m b/test/CodeGenObjC/metadata-symbols-64.m
index a3d5bc9525..0cd4dacf12 100644
--- a/test/CodeGenObjC/metadata-symbols-64.m
+++ b/test/CodeGenObjC/metadata-symbols-64.m
@@ -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 &&
diff --git a/test/CodeGenObjC/synthesize_ivar-cont-class.m b/test/CodeGenObjC/synthesize_ivar-cont-class.m
index e25b737e45..b1a7d0e680 100644
--- a/test/CodeGenObjC/synthesize_ivar-cont-class.m
+++ b/test/CodeGenObjC/synthesize_ivar-cont-class.m
@@ -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;