summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/asm.c
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2013-12-16 03:20:06 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2013-12-16 03:20:06 +0000
commitd68c7aa7e633e6bd191d3964eb5a941f8d66f152 (patch)
tree0ce9bb8daa1e43485aad1495179f76c200a5cc96 /clang/test/Sema/asm.c
parent774cabb5386f9d680a28d83ee478c79673bef145 (diff)
downloadbcm5719-llvm-d68c7aa7e633e6bd191d3964eb5a941f8d66f152.tar.gz
bcm5719-llvm-d68c7aa7e633e6bd191d3964eb5a941f8d66f152.zip
Stop crashing on empty asm input constraints
An empty string for an ASM input constraint is invalid, and will crash during clang CodeGen. Change TargetInfo::validateInputConstraint to reject an empty string. <rdar://problem/15552191> llvm-svn: 197362
Diffstat (limited to 'clang/test/Sema/asm.c')
-rw-r--r--clang/test/Sema/asm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Sema/asm.c b/clang/test/Sema/asm.c
index c81f16a3875..1559b228c87 100644
--- a/clang/test/Sema/asm.c
+++ b/clang/test/Sema/asm.c
@@ -13,6 +13,9 @@ void f() {
asm ("foo\n" : "=a" (i) : "[" (i)); // expected-error {{invalid input constraint '[' in asm}}
asm ("foo\n" : "=a" (i) : "[foo" (i)); // expected-error {{invalid input constraint '[foo' in asm}}
asm ("foo\n" : "=a" (i) : "[symbolic_name]" (i)); // expected-error {{invalid input constraint '[symbolic_name]' in asm}}
+
+ asm ("foo\n" : : "" (i)); // expected-error {{invalid input constraint '' in asm}}
+ asm ("foo\n" : "=a" (i) : "" (i)); // expected-error {{invalid input constraint '' in asm}}
}
void clobbers() {
OpenPOWER on IntegriCloud