diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2013-09-27 14:48:01 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2013-09-27 14:48:01 +0000 |
commit | a53d7a0259ff88f78ba8ecac7d0cb3ea96302b1d (patch) | |
tree | d1ca7b5de2827159f71b9d351ae2048cea182345 /test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp | |
parent | acf8e90b22cfea07ba2edeaa5101160eda8dc82c (diff) |
Abstract out the emission of vtables, add basic support for vtable emission when using -cxx-abi microsoft
Reviewed at http://llvm-reviews.chandlerc.com/D1532
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191523 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp')
-rw-r--r-- | test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp b/test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp new file mode 100644 index 0000000000..92db9a789b --- /dev/null +++ b/test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp @@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -std=c++11 -fno-rtti -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s + +struct A { + constexpr A(int x) : x(x) {} + virtual void f(); + int x; +}; + +A a(42); +// CHECK: @"\01?a@@3UA@@A" = global { [1 x i8*]*, i32 } { [1 x i8*]* @"\01??_7A@@6B@", i32 42 }, align 4 + +struct B { + constexpr B(int y) : y(y) {} + virtual void g(); + int y; +}; + +struct C : A, B { + constexpr C() : A(777), B(13) {} +}; + +C c; +// CHECK: @"\01?c@@3UC@@A" = global { [1 x i8*]*, i32, [1 x i8*]*, i32 } { [1 x i8*]* @"\01??_7C@@6BA@@@", i32 777, [1 x i8*]* @"\01??_7C@@6BB@@@", i32 13 } |