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 | a5c7d706b886843d90489525da08f2f432f242e5 (patch) | |
| tree | 0bf1a3e73ddfaed543907220c7b32af78a58379c /clang/lib/CodeGen | |
| parent | 004564663381f966d9c11cbd2db0451e3971d610 (diff) | |
| download | bcm5719-llvm-a5c7d706b886843d90489525da08f2f432f242e5.tar.gz bcm5719-llvm-a5c7d706b886843d90489525da08f2f432f242e5.zip | |
Slightly revised handling of mult-alt constraints, to avoid an assert, until we have the full fix.
llvm-svn: 110706
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 3bbecfa59c5..6dad8597a88 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -861,16 +861,24 @@ static std::string SimplifyConstraint(const char *Constraint, const TargetInfo &Target, llvm::SmallVectorImpl<TargetInfo::ConstraintInfo> *OutCons=0) { std::string Result; + std::string tmp; while (*Constraint) { switch (*Constraint) { default: - Result += Target.convertConstraint(*Constraint); + tmp = Target.convertConstraint(*Constraint); + if (Result.find(tmp) == std::string::npos) // Combine unique constraints + Result += tmp; break; // Ignore these case '*': case '?': case '!': + case '=': // Will see this and the following in mult-alt constraints. + case '+': + break; + case ',': // FIXME - Until the back-end properly supports + return Result; // multiple alternative constraints, we stop here. break; case 'g': Result += "imr"; |

