diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-11-26 02:52:12 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-11-26 02:52:12 +0000 |
commit | bd94ab9a19cb4bed55ecae9558533da9606bedcf (patch) | |
tree | 549a285fa3f9a992a9dfa3f7e232a6eee08a7dc7 /test/CodeGenCXX/const-global-linkage.cpp | |
parent | b73a5be8a85f1823c6e63f85dafaca413d6de40c (diff) |
Use new getLinkage() method to correctly compute whether a variable has
internal linkage. Fixes PR5433.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89931 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/const-global-linkage.cpp')
-rw-r--r-- | test/CodeGenCXX/const-global-linkage.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGenCXX/const-global-linkage.cpp b/test/CodeGenCXX/const-global-linkage.cpp new file mode 100644 index 0000000000..ddf435823b --- /dev/null +++ b/test/CodeGenCXX/const-global-linkage.cpp @@ -0,0 +1,8 @@ +// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s + +const int x = 10; +const int y = 20; +// CHECK-NOT: @x +// CHECK: @y = internal constant i32 20 +const int& b() { return y; } + |