diff options
author | Anders Carlsson <andersca@mac.com> | 2009-01-17 23:36:15 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-01-17 23:36:15 +0000 |
commit | 45b050e72d058131e6f169fe54888bb91a003fb5 (patch) | |
tree | 8e509aa4ab8c4c90efb3af384bfe792711042a3c /lib/Basic/TargetInfo.cpp | |
parent | 573acde1db5cb3e216e3d63fee173230834093d8 (diff) |
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
Diffstat (limited to 'lib/Basic/TargetInfo.cpp')
-rw-r--r-- | lib/Basic/TargetInfo.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp index 05004b7305..89bc8b4c8f 100644 --- a/lib/Basic/TargetInfo.cpp +++ b/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; |