diff options
Diffstat (limited to 'test/FrontendC++')
-rw-r--r-- | test/FrontendC++/alignstack.cpp | 23 | ||||
-rw-r--r-- | test/FrontendC++/member-alignment.cpp | 2 | ||||
-rw-r--r-- | test/FrontendC++/varargs.cpp | 19 |
3 files changed, 43 insertions, 1 deletions
diff --git a/test/FrontendC++/alignstack.cpp b/test/FrontendC++/alignstack.cpp new file mode 100644 index 0000000..4f993d6 --- /dev/null +++ b/test/FrontendC++/alignstack.cpp @@ -0,0 +1,23 @@ +// RUN: %llvmgxx %s -fasm-blocks -S -o - | FileCheck %s +// Complicated expression as jump target +// XFAIL: * +// XTARGET: x86,i386,i686,darwin + +void Method3() +{ +// CHECK: Method3 +// CHECK-NOT: alignstack + asm("foo:"); +// CHECK: return +} + +void Method4() +{ +// CHECK: Method4 +// CHECK: alignstack + asm { + bar: + } +// CHECK: return +} + diff --git a/test/FrontendC++/member-alignment.cpp b/test/FrontendC++/member-alignment.cpp index 01c90ca..6afc0aa 100644 --- a/test/FrontendC++/member-alignment.cpp +++ b/test/FrontendC++/member-alignment.cpp @@ -1,5 +1,5 @@ // RUN: %llvmgxx -S -emit-llvm %s -o - | FileCheck %s -// XFAIL: arm +// XFAIL: arm,powerpc // rdar://7268289 diff --git a/test/FrontendC++/varargs.cpp b/test/FrontendC++/varargs.cpp new file mode 100644 index 0000000..1c07aed --- /dev/null +++ b/test/FrontendC++/varargs.cpp @@ -0,0 +1,19 @@ +// RUN: %llvmgxx -S -emit-llvm %s -o - | FileCheck %s +// rdar://7309675 +// PR4678 + +// test1 should be compmiled to be a varargs function in the IR even +// though there is no way to do a va_begin. Otherwise, the optimizer +// will warn about 'dropped arguments' at the call site. + +// CHECK: define i32 @_Z5test1z(...) +int test1(...) { + return -1; +} + +// CHECK: call i32 (...)* @_Z5test1z(i32 0) +void test() { + test1(0); +} + + |