Replace inline asm constraint "=a" by the more general constraint "=r".
That extend a range of platforms support this test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157247 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/nullptr.cpp b/test/Analysis/nullptr.cpp
index 3119b4f..050c3f8 100644
--- a/test/Analysis/nullptr.cpp
+++ b/test/Analysis/nullptr.cpp
@@ -55,7 +55,7 @@
int **a = 0;
int **b = 0;
asm ("nop"
- :"=a"(*a)
+ :"=r"(*a)
:"0"(*b) // expected-warning{{Dereference of null pointer}}
);
}
diff --git a/test/SemaTemplate/instantiate-expr-1.cpp b/test/SemaTemplate/instantiate-expr-1.cpp
index 9395117..e777243 100644
--- a/test/SemaTemplate/instantiate-expr-1.cpp
+++ b/test/SemaTemplate/instantiate-expr-1.cpp
@@ -127,7 +127,7 @@
template<typename T>
void test_asm(T t) {
- asm ("nop" : "=a"(*t) : "r"(*t)); // expected-error {{indirection requires pointer operand ('int' invalid)}}
+ asm ("nop" : "=r"(*t) : "r"(*t)); // expected-error {{indirection requires pointer operand ('int' invalid)}}
}
void test_asm() {