summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjCXX/mangle-blocks.mm
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2013-07-02 17:52:28 +0000
committerEli Friedman <eli.friedman@gmail.com>2013-07-02 17:52:28 +0000
commit95f501284a0d0ba676e232475ec39b2d4e8900c7 (patch)
tree67d5aaa3c389cf2a6f0aeeb00f26512f49f7092c /clang/test/CodeGenObjCXX/mangle-blocks.mm
parent43bbdd29de9970b9f8d57b9cf45c3620213b0ab9 (diff)
downloadbcm5719-llvm-95f501284a0d0ba676e232475ec39b2d4e8900c7.tar.gz
bcm5719-llvm-95f501284a0d0ba676e232475ec39b2d4e8900c7.zip
More fixes for block mangling.
Make sure we properly treat names defined inside a block as local names. There are basically three fixes here. One, correctly treat blocks as a context where we need to use local-name mangling using the new isLocalContainerContext helper. Two, make CXXNameMangler::manglePrefix handle local names in a consistent way. Three, extend CXXNameMangler::mangleLocalName so it can mangle a block correctly. llvm-svn: 185450
Diffstat (limited to 'clang/test/CodeGenObjCXX/mangle-blocks.mm')
-rw-r--r--clang/test/CodeGenObjCXX/mangle-blocks.mm14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/test/CodeGenObjCXX/mangle-blocks.mm b/clang/test/CodeGenObjCXX/mangle-blocks.mm
index 6493135050d..9630c475bdb 100644
--- a/clang/test/CodeGenObjCXX/mangle-blocks.mm
+++ b/clang/test/CodeGenObjCXX/mangle-blocks.mm
@@ -1,14 +1,14 @@
// RUN: %clang_cc1 -emit-llvm -fblocks -o - -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 %s | FileCheck %s
-// CHECK: @_ZGVN3fooUb_5valueE = internal global i64 0
-// CHECK: @_ZN26externally_visible_statics1SUb_1jE = linkonce_odr global i32 0
-// CHECK: @_ZN26externally_visible_statics10inlinefuncUb_1iE = linkonce_odr global i32 0
+// CHECK: @_ZGVZZ3foovEUb_E5value = internal global i64 0
+// CHECK: @_ZZ26externally_visible_statics1S1xMUb_E1j = linkonce_odr global i32 0
+// CHECK: @_ZZZN26externally_visible_statics10inlinefuncEvEUb_E1i = linkonce_odr global i32 0
int f();
void foo() {
// CHECK: define internal i32 @___Z3foov_block_invoke
- // CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVN3fooUb_5valueE
+ // CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZZ3foovEUb_E5value
(void)^(int x) {
static int value = f();
return x + value;
@@ -26,7 +26,7 @@ int i = ^(int x) { return x;}(i);
- (void)method {
// CHECK: define internal signext i8 @"__11-[A method]_block_invoke"
(void)^(int x) {
- // CHECK: @"_ZN11-[A method]Ub0_4nameE"
+ // CHECK: @"_ZZZ11-[A method]EUb0_E4name"
static const char *name = "hello";
return name[x];
};
@@ -44,7 +44,7 @@ namespace N {
// CHECK: define internal signext i8 @___Z3fooi_block_invoke
void bar() {
(void)^(int x) {
- // CHECK: @_ZN1N3barUb2_4nameE
+ // CHECK: @_ZZZN1N3barEvEUb2_E4name
static const char *name = "hello";
return name[x];
};
@@ -56,7 +56,7 @@ class C {
};
C::C() {
(void)^(int x) {
- // CHECK: @_ZN1CC1Ub3_5namebE
+ // CHECK: @_ZZZN1CC1EvEUb3_E5nameb
static const char *nameb = "hello";
return nameb[x];
};
OpenPOWER on IntegriCloud