aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;