diff options
author | Aleksei Sidorin <a.sidorin@samsung.com> | 2016-09-28 11:04:42 +0000 |
---|---|---|
committer | Aleksei Sidorin <a.sidorin@samsung.com> | 2016-09-28 11:04:42 +0000 |
commit | e716c9e3bb9eb7336ca77da22d880fa456bcdc6c (patch) | |
tree | 78c81446d40282fa342079fc686666ec68b572c5 /test/ASTMerge | |
parent | 7fc60d9e117f4e7f3767089067d3e947f76801ae (diff) |
ASTMerge: explicitly specify arch for GCCAsmStmt test to calm non-x86 buildbots
This should fix r282572.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ASTMerge')
-rw-r--r-- | test/ASTMerge/Inputs/asm-function.cpp | 11 | ||||
-rw-r--r-- | test/ASTMerge/asm.cpp | 7 |
2 files changed, 18 insertions, 0 deletions
diff --git a/test/ASTMerge/Inputs/asm-function.cpp b/test/ASTMerge/Inputs/asm-function.cpp new file mode 100644 index 0000000000..59c4edfbcd --- /dev/null +++ b/test/ASTMerge/Inputs/asm-function.cpp @@ -0,0 +1,11 @@ + +unsigned char asmFunc(unsigned char a, unsigned char b) { + unsigned int la = a; + unsigned int lb = b; + unsigned int bigres; + unsigned char res; + __asm__ ("0:\n1:\n" : [bigres] "=la"(bigres) : [la] "0"(la), [lb] "c"(lb) : + "edx", "cc"); + res = bigres; + return res; +} diff --git a/test/ASTMerge/asm.cpp b/test/ASTMerge/asm.cpp new file mode 100644 index 0000000000..3a0a205720 --- /dev/null +++ b/test/ASTMerge/asm.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -triple i386-unknown-unknown -fcxx-exceptions -emit-pch -o %t.1.ast %S/Inputs/asm-function.cpp +// RUN: %clang_cc1 -triple i386-unknown-unknown -fcxx-exceptions -ast-merge %t.1.ast -fsyntax-only -verify %s +// expected-no-diagnostics + +void testAsmImport() { + asmFunc(12, 42); +} |