diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-06 22:18:21 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-06 22:18:21 +0000 |
commit | ae498b321182c8ee7c3fd29b78a3b83a72430c68 (patch) | |
tree | 407067b85841274054151788abfe5d1702bd0177 /clang/test/CodeGenCXX/anonymous-namespaces.cpp | |
parent | 6eeb221f3be0378c5c939ba024c0967d2c7f2d9d (diff) | |
download | llvm-ae498b321182c8ee7c3fd29b78a3b83a72430c68.zip llvm-ae498b321182c8ee7c3fd29b78a3b83a72430c68.tar.gz llvm-ae498b321182c8ee7c3fd29b78a3b83a72430c68.tar.bz2 |
The global variable for the VTT might not have external linkage; allow
us to find local variables, too. Fixes the last remaining
Boost.Rational failure.
llvm-svn: 103203
Diffstat (limited to 'clang/test/CodeGenCXX/anonymous-namespaces.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/anonymous-namespaces.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/anonymous-namespaces.cpp b/clang/test/CodeGenCXX/anonymous-namespaces.cpp index 695f8f5..fb3470c 100644 --- a/clang/test/CodeGenCXX/anonymous-namespaces.cpp +++ b/clang/test/CodeGenCXX/anonymous-namespaces.cpp @@ -1,6 +1,5 @@ // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s - int f(); namespace { @@ -20,6 +19,13 @@ namespace { int D::d = f(); + // Check for generation of a VTT with internal linkage + // CHECK: @_ZTSN12_GLOBAL__N_11X1EE = internal constant + struct X { + struct EBase { }; + struct E : public virtual EBase { virtual ~E() {} }; + }; + // CHECK: define internal i32 @_ZN12_GLOBAL__N_13fooEv() int foo() { return 32; @@ -36,3 +42,5 @@ namespace { int concrete() { return a + foo() + A::foo(); } + +void test_XE() { throw X::E(); } |