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 | f4aac11a5e49752b7f603e6ff2c6bbc1e044eb24 (patch) | |
tree | 55d3e5c713eb4858caf0f240fcd6303b18eec2cf /test/CodeGenCXX/anonymous-namespaces.cpp | |
parent | 78781780115923aeb6d0f46dfa7cbd1fb5fcaaa8 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/anonymous-namespaces.cpp')
-rw-r--r-- | test/CodeGenCXX/anonymous-namespaces.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/CodeGenCXX/anonymous-namespaces.cpp b/test/CodeGenCXX/anonymous-namespaces.cpp index 695f8f59de..fb3470ca9b 100644 --- a/test/CodeGenCXX/anonymous-namespaces.cpp +++ b/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(); } |