pull the constraint string into the ConstraintInfo struct
instead of passing it around in addition to it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70135 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp
index cee13ea..b8aa535 100644
--- a/lib/Basic/TargetInfo.cpp
+++ b/lib/Basic/TargetInfo.cpp
@@ -163,8 +163,8 @@
return Name;
}
-bool TargetInfo::validateOutputConstraint(const char *Name,
- ConstraintInfo &Info) const {
+bool TargetInfo::validateOutputConstraint(ConstraintInfo &Info) const {
+ const char *Name = Info.getConstraintStr().c_str();
// An output constraint must start with '=' or '+'
if (*Name != '=' && *Name != '+')
return false;
@@ -231,11 +231,12 @@
return false;
}
-bool TargetInfo::validateInputConstraint(const char *Name,
- const std::string *OutputNamesBegin,
+bool TargetInfo::validateInputConstraint(const std::string *OutputNamesBegin,
const std::string *OutputNamesEnd,
ConstraintInfo *OutputConstraints,
ConstraintInfo &Info) const {
+ const char *Name = Info.ConstraintStr.c_str();
+
while (*Name) {
switch (*Name) {
default: