diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2006-11-28 22:25:32 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2006-11-28 22:25:32 +0000 |
commit | 8b59fd03c2e1b034e7d5710b36d87ec7b3e62234 (patch) | |
tree | 8f74dd91e87ad706fd39e88dcfc6740514d39a48 /llvm/lib/Target/CBackend | |
parent | f89955be1b7dcafcaffd966e53955d7e9bbece03 (diff) | |
download | bcm5719-llvm-8b59fd03c2e1b034e7d5710b36d87ec7b3e62234.tar.gz bcm5719-llvm-8b59fd03c2e1b034e7d5710b36d87ec7b3e62234.zip |
Make identity default, and fix PR1020
llvm-svn: 31979
Diffstat (limited to 'llvm/lib/Target/CBackend')
-rw-r--r-- | llvm/lib/Target/CBackend/Writer.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp index 18c4d064e33..89ed2ad021a 100644 --- a/llvm/lib/Target/CBackend/Writer.cpp +++ b/llvm/lib/Target/CBackend/Writer.cpp @@ -2265,10 +2265,6 @@ std::string CWriter::InterpretASMConstraint(InlineAsm::ConstraintInfo& c) { assert(c.Codes.size() == 1 && "Too many asm constraint codes to handle"); - //catch numeric constraints - if (c.Codes[0].find_first_not_of("0123456789") >= c.Codes[0].size()) - return c.Codes[0]; - const char** table = 0; //Grab the translation table from TargetAsmInfo if it exists @@ -2291,8 +2287,8 @@ std::string CWriter::InterpretASMConstraint(InlineAsm::ConstraintInfo& c) { if (c.Codes[0] == table[i]) return table[i+1]; - assert(0 && "Unknown Asm Constraint"); - return ""; + //default is identity + return c.Codes[0]; } //TODO: import logic from AsmPrinter.cpp @@ -2383,7 +2379,7 @@ void CWriter::visitInlineAsm(CallInst &CI) { if (I + 1 != E) Out << ","; } - Out << "\n :" << Clobber.substr(1) << ")\n"; + Out << "\n :" << (Clobber.size() ? Clobber.substr(1) : "") << ")\n"; } void CWriter::visitMallocInst(MallocInst &I) { |