]> granicus.if.org Git - clang/commitdiff
ASTMerge: explicitly specify arch for GCCAsmStmt test to calm non-x86 buildbots
authorAleksei Sidorin <a.sidorin@samsung.com>
Wed, 28 Sep 2016 11:04:42 +0000 (11:04 +0000)
committerAleksei Sidorin <a.sidorin@samsung.com>
Wed, 28 Sep 2016 11:04:42 +0000 (11:04 +0000)
This should fix r282572.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282578 91177308-0d34-0410-b5e6-96231b3b80d8

test/ASTMerge/Inputs/asm-function.cpp [new file with mode: 0644]
test/ASTMerge/asm.cpp [new file with mode: 0644]

diff --git a/test/ASTMerge/Inputs/asm-function.cpp b/test/ASTMerge/Inputs/asm-function.cpp
new file mode 100644 (file)
index 0000000..59c4edf
--- /dev/null
@@ -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 (file)
index 0000000..3a0a205
--- /dev/null
@@ -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);
+}