diff options
| author | Warren Hunt <whunt@google.com> | 2013-11-14 22:34:59 +0000 |
|---|---|---|
| committer | Warren Hunt <whunt@google.com> | 2013-11-14 22:34:59 +0000 |
| commit | d840e40113db0ef0c904357002218de5f541f654 (patch) | |
| tree | cff6ef4d0e6da20dd01425f93cad873538f344e5 /clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp | |
| parent | 3383eecd6855e53f3fd11c6060e83f0fca638466 (diff) | |
| download | bcm5719-llvm-d840e40113db0ef0c904357002218de5f541f654.tar.gz bcm5719-llvm-d840e40113db0ef0c904357002218de5f541f654.zip | |
Makes A Microsoft Layout CodeGen Test Explicit
This patch tests introduces a proper codegen test in place of the
"codegen no longer crashes" test introduced in r193664. The test is also
moved from layout to CodeGenCXX.
Differential Revision: http://llvm-reviews.chandlerc.com/D2174
llvm-svn: 194739
Diffstat (limited to 'clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp b/clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp new file mode 100644 index 00000000000..7407efed2f9 --- /dev/null +++ b/clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -fno-rtti -emit-llvm -cxx-abi microsoft -triple=i686-pc-win32 -o - %s 2>/dev/null | FileCheck %s +// RUN: %clang_cc1 -fno-rtti -emit-llvm -cxx-abi microsoft -triple=x86_64-pc-win32 -o - %s 2>/dev/null | FileCheck %s -check-prefix CHECK-X64 + +struct B { char a; }; +struct A : virtual B {} a; + +// The <> indicate that the pointer is packed, which is required to support +// microsoft layout in 32 bit mode, but not 64 bit mode. +// CHECK: %struct.A = type <{ i32*, %struct.B }>
+// CHECK-X64: %struct.A = type { i32*, %struct.B }
|

