r225942 - Sema: Relax parsing of '#' in constraints
David Majnemer
david.majnemer at gmail.com
Tue Jan 13 21:11:10 PST 2015
Author: majnemer
Date: Tue Jan 13 23:11:09 2015
New Revision: 225942
URL: http://llvm.org/viewvc/llvm-project?rev=225942&view=rev
Log:
Sema: Relax parsing of '#' in constraints
Modified:
cfe/trunk/lib/Basic/TargetInfo.cpp
cfe/trunk/test/Sema/asm.c
Modified: cfe/trunk/lib/Basic/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/TargetInfo.cpp?rev=225942&r1=225941&r2=225942&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/TargetInfo.cpp (original)
+++ cfe/trunk/lib/Basic/TargetInfo.cpp Tue Jan 13 23:11:09 2015
@@ -489,8 +489,6 @@ bool TargetInfo::validateOutputConstrain
case '#': // Ignore as constraint.
while (Name[1] && Name[1] != ',')
Name++;
- if (Name[1] != ',')
- return false;
break;
case '?': // Disparage slightly code.
case '!': // Disparage severely.
@@ -637,8 +635,6 @@ bool TargetInfo::validateInputConstraint
case '#': // Ignore as constraint.
while (Name[1] && Name[1] != ',')
Name++;
- if (Name[1] != ',')
- return false;
break;
case '?': // Disparage slightly code.
case '!': // Disparage severely.
Modified: cfe/trunk/test/Sema/asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/asm.c?rev=225942&r1=225941&r2=225942&view=diff
==============================================================================
--- cfe/trunk/test/Sema/asm.c (original)
+++ cfe/trunk/test/Sema/asm.c Tue Jan 13 23:11:09 2015
@@ -188,7 +188,7 @@ void fn4() {
int l;
__asm__(""
: "=r"(l)
- : "#m"(l)); // expected-error {{invalid input constraint '#m' in asm}}
+ : "m#"(l));
}
void fn5() {
More information about the cfe-commits
mailing list