aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/TargetInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Basic/TargetInfo.cpp')
-rw-r--r--lib/Basic/TargetInfo.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp
index 7fcf372a36..05db02a9fe 100644
--- a/lib/Basic/TargetInfo.cpp
+++ b/lib/Basic/TargetInfo.cpp
@@ -287,8 +287,17 @@ bool TargetInfo::validateOutputConstraint(ConstraintInfo &Info) const {
Info.setAllowsRegister();
Info.setAllowsMemory();
break;
- case ',': // FIXME: Until we handle multiple alternative constraints,
- return true; // ignore everything after the first comma.
+ case ',': // multiple alternative constraint. Pass it.
+ Name++;
+ // An output constraint must start with '=' or '+'
+ if (*Name != '=' && *Name != '+')
+ return false;
+ if (*Name == '+')
+ Info.setIsReadWrite();
+ break;
+ case '?': // Disparage slightly code.
+ case '!': // Disparage severly.
+ break; // Pass them.
}
Name++;
@@ -382,8 +391,11 @@ bool TargetInfo::validateInputConstraint(ConstraintInfo *OutputConstraints,
Info.setAllowsRegister();
Info.setAllowsMemory();
break;
- case ',': // FIXME: Until we handle multiple alternative constraints,
- return true; // ignore everything after the first comma.
+ case ',': // multiple alternative constraint. Ignore comma.
+ break;
+ case '?': // Disparage slightly code.
+ case '!': // Disparage severly.
+ break; // Pass them.
}
Name++;