summaryrefslogtreecommitdiffstats
path: root/clang/test/ASTMerge
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/ASTMerge')
-rw-r--r--clang/test/ASTMerge/asm/Inputs/asm-function.cpp10
-rw-r--r--clang/test/ASTMerge/asm/test.cpp1
2 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/ASTMerge/asm/Inputs/asm-function.cpp b/clang/test/ASTMerge/asm/Inputs/asm-function.cpp
index 59c4edfbcd2..1b8783354fc 100644
--- a/clang/test/ASTMerge/asm/Inputs/asm-function.cpp
+++ b/clang/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/clang/test/ASTMerge/asm/test.cpp b/clang/test/ASTMerge/asm/test.cpp
index 3a0a205720f..8c3bdfe17b7 100644
--- a/clang/test/ASTMerge/asm/test.cpp
+++ b/clang/test/ASTMerge/asm/test.cpp
@@ -4,4 +4,5 @@
void testAsmImport() {
asmFunc(12, 42);
+ asmFunc2(42);
}
OpenPOWER on IntegriCloud