summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjCXX/mangle.mm
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-12-10 03:14:39 +0000
committerAnders Carlsson <andersca@mac.com>2009-12-10 03:14:39 +0000
commitbf56946073183d18b257d72f9f81a1871e0da783 (patch)
treed0b18da24923a74c297feafb3cf96a165c4beee3 /clang/test/CodeGenObjCXX/mangle.mm
parentd5bc94e2eb728d995b31a18e16fe5fc359fe7047 (diff)
downloadbcm5719-llvm-bf56946073183d18b257d72f9f81a1871e0da783.tar.gz
bcm5719-llvm-bf56946073183d18b257d72f9f81a1871e0da783.zip
Mangle static variables inside Objective-C methods in Objective-C++. We currently mangle them the same way as gcc does.
llvm-svn: 91042
Diffstat (limited to 'clang/test/CodeGenObjCXX/mangle.mm')
-rw-r--r--clang/test/CodeGenObjCXX/mangle.mm32
1 files changed, 32 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjCXX/mangle.mm b/clang/test/CodeGenObjCXX/mangle.mm
new file mode 100644
index 00000000000..00df14b689d
--- /dev/null
+++ b/clang/test/CodeGenObjCXX/mangle.mm
@@ -0,0 +1,32 @@
+// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
+
+// CHECK: @"_ZZ11+[A shared]E1a" = internal global
+// CHECK: @"_ZZ11-[A(Foo) f]E1a" = internal global
+
+@interface A
+@end
+
+@implementation A
+
++ (A *)shared {
+ static A* a;
+
+ return a;
+}
+
+@end
+
+@interface A(Foo)
+@end
+
+@implementation A(Foo)
+- (int)f {
+ // FIXME: Add a member function to s and make sure that it's mangled correctly.
+ struct s {
+ };
+
+ static s a;
+
+ return 0;
+}
+@end
OpenPOWER on IntegriCloud