diff options
author | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2010-08-10 19:20:14 +0000 |
---|---|---|
committer | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2010-08-10 19:20:14 +0000 |
commit | ef44e1110711276ffffe4b22d4ba0cebd49cb330 (patch) | |
tree | b3cc4f9758724424ba577fd1260b3ae9b8b6ff54 /lib/Basic | |
parent | 224124c7b85596157201a67a7ba12d2b0f5c153c (diff) |
Slightly revised handling of mult-alt constraints, to avoid an assert, until we have the full fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110706 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic')
-rw-r--r-- | lib/Basic/TargetInfo.cpp | 20 |
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++; |