summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-01-11 09:39:03 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-01-11 09:39:03 +0000
commitc71a566d002fb6aab9e76ed2c15a754c04cb1381 (patch)
tree6132bdd504d1b67a4fd413c19f89c9c891d6199b /clang/lib/Basic
parentf1fdf4a80cbca86eadeadc7212701d4231344d01 (diff)
downloadbcm5719-llvm-c71a566d002fb6aab9e76ed2c15a754c04cb1381.tar.gz
bcm5719-llvm-c71a566d002fb6aab9e76ed2c15a754c04cb1381.zip
Basic: The asm constraint '#m' isn't valid, reject it
llvm-svn: 225603
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r--clang/lib/Basic/TargetInfo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp
index 3162b7cde23..15b8c83d1b3 100644
--- a/clang/lib/Basic/TargetInfo.cpp
+++ b/clang/lib/Basic/TargetInfo.cpp
@@ -491,6 +491,7 @@ bool TargetInfo::validateOutputConstraint(ConstraintInfo &Info) const {
Name++;
if (Name[1] != ',')
return false;
+ break;
case '?': // Disparage slightly code.
case '!': // Disparage severely.
case '*': // Ignore for choosing register preferences.
@@ -623,9 +624,14 @@ bool TargetInfo::validateInputConstraint(ConstraintInfo *OutputConstraints,
break;
case ',': // multiple alternative constraint. Ignore comma.
break;
+ case '#': // Ignore as constraint.
+ while (Name[1] && Name[1] != ',')
+ Name++;
+ if (Name[1] != ',')
+ return false;
+ break;
case '?': // Disparage slightly code.
case '!': // Disparage severely.
- case '#': // Ignore as constraint.
case '*': // Ignore for choosing register preferences.
break; // Pass them.
}
OpenPOWER on IntegriCloud