summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/TargetInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-26 17:19:08 +0000
committerChris Lattner <sabre@nondot.org>2009-04-26 17:19:08 +0000
commitc3f4c7b1c5e78ba5deb850914681b298567eaeb3 (patch)
tree5c0d4ac4db64024c614bf6ef8574e233f4c6dac0 /clang/lib/Basic/TargetInfo.cpp
parent8d319047c53a3b6cb99ff653dd5a8a39a5663373 (diff)
downloadbcm5719-llvm-c3f4c7b1c5e78ba5deb850914681b298567eaeb3.tar.gz
bcm5719-llvm-c3f4c7b1c5e78ba5deb850914681b298567eaeb3.zip
pull the constraint string into the ConstraintInfo struct
instead of passing it around in addition to it. llvm-svn: 70135
Diffstat (limited to 'clang/lib/Basic/TargetInfo.cpp')
-rw-r--r--clang/lib/Basic/TargetInfo.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp
index cee13eab412..b8aa5353295 100644
--- a/clang/lib/Basic/TargetInfo.cpp
+++ b/clang/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:
OpenPOWER on IntegriCloud