summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/mangle.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2013-07-10 00:30:46 +0000
committerEli Friedman <eli.friedman@gmail.com>2013-07-10 00:30:46 +0000
commit5e867c8a07d82da0d3b0a43402ee4f1c6ba416e9 (patch)
treed2986856dd03e6ec38e841a5bf7ca389b774625d /test/CodeGenCXX/mangle.cpp
parente16a4755989ae3e4cf15c8b1ed265a546bf1b8bd (diff)
More local mangling fixes.
Compute mangling numbers for externally visible local variables and tags. Change the mangler to consistently use discriminators where necessary. Tweak the scheme we use to number decls which are not externally visible to avoid unnecessary discriminators in common cases now that we request them more consistently. Fixes <rdar://problem/14204721>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle.cpp')
-rw-r--r--test/CodeGenCXX/mangle.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp
index 5f31e5480d..4b601229d3 100644
--- a/test/CodeGenCXX/mangle.cpp
+++ b/test/CodeGenCXX/mangle.cpp
@@ -888,7 +888,7 @@ namespace test38 {
}
namespace test39 {
- // CHECK: define internal void @"_ZN6test394funcINS_3$_0Ut_EEEvT_"
+ // CHECK: define internal void @"_ZN6test394funcINS_3$_03$_1EEEvT_"
typedef struct {
struct {} a;
} *foo;
@@ -897,3 +897,16 @@ namespace test39 {
func(x->a);
}
}
+
+namespace test40 {
+ // CHECK: i32* @_ZZN6test401fEvE1a_0
+ void h(int&);
+ inline void f() {
+ if (0) {
+ static int a;
+ }
+ static int a;
+ h(a);
+ };
+ void g() { f(); }
+}