summaryrefslogtreecommitdiffstats
path: root/clang/test/ASTMerge
diff options
context:
space:
mode:
authorAleksei Sidorin <a.sidorin@samsung.com>2016-09-28 11:04:42 +0000
committerAleksei Sidorin <a.sidorin@samsung.com>2016-09-28 11:04:42 +0000
commit9e447e9726b12a07ed147a093339f127d5f94474 (patch)
tree816033c7decbe9b8d1da43088991066159d61163 /clang/test/ASTMerge
parent6ef82b6754e6198e0f22b1badaf9b8da9f81e5d0 (diff)
downloadbcm5719-llvm-9e447e9726b12a07ed147a093339f127d5f94474.tar.gz
bcm5719-llvm-9e447e9726b12a07ed147a093339f127d5f94474.zip
ASTMerge: explicitly specify arch for GCCAsmStmt test to calm non-x86 buildbots
This should fix r282572. llvm-svn: 282578
Diffstat (limited to 'clang/test/ASTMerge')
-rw-r--r--clang/test/ASTMerge/Inputs/asm-function.cpp11
-rw-r--r--clang/test/ASTMerge/asm.cpp7
2 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/ASTMerge/Inputs/asm-function.cpp b/clang/test/ASTMerge/Inputs/asm-function.cpp
new file mode 100644
index 00000000000..59c4edfbcd2
--- /dev/null
+++ b/clang/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/clang/test/ASTMerge/asm.cpp b/clang/test/ASTMerge/asm.cpp
new file mode 100644
index 00000000000..3a0a205720f
--- /dev/null
+++ b/clang/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);
+}
OpenPOWER on IntegriCloud