diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-07 07:59:52 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-07 07:59:52 +0000 |
commit | e1b3e6292a355dafc4757d7cd2f2e04ca71927fa (patch) | |
tree | 875fb168fdf4b136ae07140d784f811120ea0211 /clang/test/CodeGenCXX/vtable-key-function.cpp | |
parent | 27cfc6e144da767c7196fe06e5388210a290314f (diff) | |
download | bcm5719-llvm-e1b3e6292a355dafc4757d7cd2f2e04ca71927fa.tar.gz bcm5719-llvm-e1b3e6292a355dafc4757d7cd2f2e04ca71927fa.zip |
It's OK to try to emit a vtable definition more than once. Fixes PR5697.
llvm-svn: 90751
Diffstat (limited to 'clang/test/CodeGenCXX/vtable-key-function.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/vtable-key-function.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/vtable-key-function.cpp b/clang/test/CodeGenCXX/vtable-key-function.cpp new file mode 100644 index 00000000000..b0371c0e0ba --- /dev/null +++ b/clang/test/CodeGenCXX/vtable-key-function.cpp @@ -0,0 +1,15 @@ +// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// PR5697 +namespace PR5697 { +struct A { + virtual void f() { } + A(); + A(int); +}; + +// A does not have a key function, so the first constructor we emit should +// cause the vtable to be defined (without assertions.) +// CHECK: @_ZTVN6PR56971AE = weak_odr constant +A::A() { } +A::A(int) { } +} |