summaryrefslogtreecommitdiff
path: root/test/ASTMerge
diff options
context:
space:
mode:
authorGabor Horvath <xazax.hun@gmail.com>2017-03-13 15:32:24 +0000
committerGabor Horvath <xazax.hun@gmail.com>2017-03-13 15:32:24 +0000
commit5f2fe71e3a9e5de475e77fcf8e0e08985f9d4ccc (patch)
treea974cbf02f5bff2d191c2e5ed4b6d58c59d729f2 /test/ASTMerge
parentde06f0b75e05b038554ccd5f8267cec1371bd6f1 (diff)
[ASTImporter] Import fix of GCCAsmStmts w/ missing symbolic operands
Patch by Zoltan Gera! Differential Revision: https://reviews.llvm.org/D30831 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297627 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ASTMerge')
-rw-r--r--test/ASTMerge/asm/Inputs/asm-function.cpp10
-rw-r--r--test/ASTMerge/asm/test.cpp1
2 files changed, 11 insertions, 0 deletions
diff --git a/test/ASTMerge/asm/Inputs/asm-function.cpp b/test/ASTMerge/asm/Inputs/asm-function.cpp
index 59c4edfbcd..1b8783354f 100644
--- a/test/ASTMerge/asm/Inputs/asm-function.cpp
+++ b/test/ASTMerge/asm/Inputs/asm-function.cpp
@@ -9,3 +9,13 @@ unsigned char asmFunc(unsigned char a, unsigned char b) {
res = bigres;
return res;
}
+
+int asmFunc2(int i) {
+ int res;
+ asm ("mov %1, %0 \t\n"
+ "inc %0 "
+ : "=r" (res)
+ : "r" (i)
+ : "cc");
+ return res;
+}
diff --git a/test/ASTMerge/asm/test.cpp b/test/ASTMerge/asm/test.cpp
index 3a0a205720..8c3bdfe17b 100644
--- a/test/ASTMerge/asm/test.cpp
+++ b/test/ASTMerge/asm/test.cpp
@@ -4,4 +4,5 @@
void testAsmImport() {
asmFunc(12, 42);
+ asmFunc2(42);
}