diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-26 17:19:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-26 17:19:08 +0000 |
commit | 432c86969eced2ce658b3f3f2aa7407c8864f21b (patch) | |
tree | ad28c508956cdfbf8e2446b037e4d1860d3184d9 /lib/Basic/TargetInfo.cpp | |
parent | e1fb77f430b658dc540b40f6f7318b42a77e93d0 (diff) |
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
Diffstat (limited to 'lib/Basic/TargetInfo.cpp')
-rw-r--r-- | lib/Basic/TargetInfo.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp index cee13eab41..b8aa535329 100644 --- a/lib/Basic/TargetInfo.cpp +++ b/lib/Basic/TargetInfo.cpp @@ -163,8 +163,8 @@ const char *TargetInfo::getNormalizedGCCRegisterName(const char *Name) const { 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 @@ bool TargetInfo::resolveSymbolicName(const char *&Name, 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: |