diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-12-07 21:19:02 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-12-07 21:19:02 +0000 |
commit | b73458a8936a258c3c18b4d32916c20acb920fd4 (patch) | |
tree | e96dde6b98c28f949887530fdebd77656c32986f /clang/test | |
parent | 046f899611c28ffb62f83faf2a527ea6e319eaa7 (diff) | |
download | llvm-b73458a8936a258c3c18b4d32916c20acb920fd4.zip llvm-b73458a8936a258c3c18b4d32916c20acb920fd4.tar.gz llvm-b73458a8936a258c3c18b4d32916c20acb920fd4.tar.bz2 |
Merging r196658:
------------------------------------------------------------------------
r196658 | d0k | 2013-12-07 08:12:52 -0800 (Sat, 07 Dec 2013) | 7 lines
CodeGen: Don't emit linkage on thunks that aren't emitted because they're vararg.
This can happen when we're trying to emit a thunk with available_externally
linkage with optimization enabled but bail because it doesn't make sense
for vararg functions.
PR18098.
------------------------------------------------------------------------
llvm-svn: 196666
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGenCXX/thunks.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/thunks.cpp b/clang/test/CodeGenCXX/thunks.cpp index f5a85ef..defb706 100644 --- a/clang/test/CodeGenCXX/thunks.cpp +++ b/clang/test/CodeGenCXX/thunks.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -munwind-tables -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -munwind-tables -emit-llvm -o - -O1 -disable-llvm-optzns | FileCheck %s // RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -munwind-tables -fhidden-weak-vtables -emit-llvm -o - | FileCheck -check-prefix=CHECK-HIDDEN %s namespace Test1 { @@ -342,6 +343,27 @@ namespace Test14 { // CHECK: define void @_ZThn8_N6Test141C1fEv({{.*}}) unnamed_addr [[NUW:#[0-9]+]] } +// Varargs non-covariant thunk test. +// PR18098 +namespace Test15 { + struct A { + virtual ~A(); + }; + struct B { + virtual void f(int x, ...); + }; + struct C : A, B { + virtual void c(); + virtual void f(int x, ...); + }; + void C::c() {} + + // C::c + // CHECK: declare void @_ZN6Test151C1fEiz + // non-virtual thunk to C::f + // CHECK: declare void @_ZThn8_N6Test151C1fEiz +} + /**** The following has to go at the end of the file ****/ // This is from Test5: |