summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/mangle.cpp
diff options
context:
space:
mode:
authorAlexis Hunt <alercah@gmail.com>2010-01-24 03:04:27 +0000
committerAlexis Hunt <alercah@gmail.com>2010-01-24 03:04:27 +0000
commitaecc45cb3c836d2dd2b6cc0df517b213f385c75d (patch)
treeb54f9e063ba75193b9735f8545d42e89780ecfeb /clang/test/CodeGenCXX/mangle.cpp
parent62ebf25f44b9a823549ed977040b7aa55793d7e4 (diff)
downloadbcm5719-llvm-aecc45cb3c836d2dd2b6cc0df517b213f385c75d.tar.gz
bcm5719-llvm-aecc45cb3c836d2dd2b6cc0df517b213f385c75d.zip
Mangle static variables with an extra name to distinguish them from non-static variables in the same TU.
Fixes PR5966 for real this time; also reverts r92911, which had a incorrect fix. llvm-svn: 94352
Diffstat (limited to 'clang/test/CodeGenCXX/mangle.cpp')
-rw-r--r--clang/test/CodeGenCXX/mangle.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/clang/test/CodeGenCXX/mangle.cpp b/clang/test/CodeGenCXX/mangle.cpp
index 5947587eec3..b4f2a3de442 100644
--- a/clang/test/CodeGenCXX/mangle.cpp
+++ b/clang/test/CodeGenCXX/mangle.cpp
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -fblocks | FileCheck %s
-
struct X { };
struct Y { };
@@ -9,6 +8,9 @@ struct Y { };
// CHECK: @_ZZN1N1gEvE1a = internal global
// CHECK: @_ZGVZN1N1gEvE1a = internal global
+//CHECK: @pr5966_i = external global
+//CHECK: @_ZL8pr5966_i = internal global
+
// CHECK: define zeroext i1 @_ZplRK1YRA100_P1X
bool operator+(const Y&, X* (&xs)[100]) { return false; }
@@ -310,7 +312,13 @@ template class Alloc<char>;
// CHECK: define void @_Z1fU13block_pointerFiiiE
void f(int (^)(int, int)) { }
-// PR5869
-// CHECK: define internal void @_ZL2f2v
-static void f2() {}
-void f3() { f2(); }
+void pr5966_foo() {
+ extern int pr5966_i;
+ pr5966_i = 0;
+}
+
+static int pr5966_i;
+
+void pr5966_bar() {
+ pr5966_i = 0;
+}
OpenPOWER on IntegriCloud