diff options
author | Sean Hunt <rideau3@gmail.com> | 2010-01-24 03:04:27 +0000 |
---|---|---|
committer | Sean Hunt <rideau3@gmail.com> | 2010-01-24 03:04:27 +0000 |
commit | 31455256ae26cc7069111643ec4429ea564377da (patch) | |
tree | 53431a5b13cc8470317d88666409862de7bd0452 /test/CodeGenCXX/mangle.cpp | |
parent | 1efcf3d137c11fb6b21c385911e0d2ca59ca94c3 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94352 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp index 5947587eec..b4f2a3de44 100644 --- a/test/CodeGenCXX/mangle.cpp +++ b/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; +} |