From: Aleksei Sidorin Date: Wed, 28 Sep 2016 11:04:42 +0000 (+0000) Subject: ASTMerge: explicitly specify arch for GCCAsmStmt test to calm non-x86 buildbots X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e716c9e3bb9eb7336ca77da22d880fa456bcdc6c;p=clang 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 --- 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); +}