[cfe-commits] r162064 - in /cfe/trunk: lib/Basic/Targets.cpp test/Sema/arm-asm.c
Eric Christopher
echristo at apple.com
Thu Aug 16 16:50:41 PDT 2012
Author: echristo
Date: Thu Aug 16 18:50:41 2012
New Revision: 162064
URL: http://llvm.org/viewvc/llvm-project?rev=162064&view=rev
Log:
Add a missing 'break' to ensure that we reject inline assembly
constraints we don't recognize.
Added:
cfe/trunk/test/Sema/arm-asm.c
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=162064&r1=162063&r2=162064&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Aug 16 18:50:41 2012
@@ -3085,7 +3085,7 @@
TargetInfo::ConstraintInfo &Info) const {
// FIXME: Check if this is complete
switch (*Name) {
- default:
+ default: break;
case 'l': // r0-r7
case 'h': // r8-r15
case 'w': // VFP Floating point register single precision
Added: cfe/trunk/test/Sema/arm-asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/arm-asm.c?rev=162064&view=auto
==============================================================================
--- cfe/trunk/test/Sema/arm-asm.c (added)
+++ cfe/trunk/test/Sema/arm-asm.c Thu Aug 16 18:50:41 2012
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 %s -triple armv7-apple-darwin -verify -fsyntax-only
+
+void f (void) {
+ int Val;
+ asm volatile ("lw (r1), %0[val]": "=&b"(Val)); // expected-error {{invalid output constraint '=&b' in asm}}
+ return;
+}
More information about the cfe-commits
mailing list