Change TargetInfo::validateInputConstraint to take begin/end name iterators instead of the number of outputs. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62433 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp
index 05004b7..89bc8b4 100644
--- a/lib/Basic/TargetInfo.cpp
+++ b/lib/Basic/TargetInfo.cpp
@@ -188,7 +188,8 @@
}
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 @@
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;