summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/TargetInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Basic/TargetInfo.cpp')
-rw-r--r--clang/lib/Basic/TargetInfo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp
index 05004b73053..89bc8b4c8f9 100644
--- a/clang/lib/Basic/TargetInfo.cpp
+++ b/clang/lib/Basic/TargetInfo.cpp
@@ -188,7 +188,8 @@ bool TargetInfo::validateOutputConstraint(const char *Name,
}
bool TargetInfo::validateInputConstraint(const char *Name,
- unsigned NumOutputs,
+ const std::string *OutputNamesBegin,
+ const std::string *OutputNamesEnd,
ConstraintInfo &info) const {
info = CI_None;
@@ -197,8 +198,9 @@ bool TargetInfo::validateInputConstraint(const char *Name,
default:
// Check if we have a matching constraint
if (*Name >= '0' && *Name <= '9') {
+ unsigned NumOutputs = OutputNamesEnd - OutputNamesBegin;
unsigned i = *Name - '0';
-
+
// Check if matching constraint is out of bounds.
if (i >= NumOutputs)
return false;
OpenPOWER on IntegriCloud