From: Andrew Lenharth Date: Tue, 28 Nov 2006 23:07:32 +0000 (+0000) Subject: gcc doesn't like an empty colbber list X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=f45148e113a213b8c91ce34a0b16aa35eb30c77a;p=oota-llvm.git gcc doesn't like an empty colbber list git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31987 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 89ed2ad021a..fa869db6aa3 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -2379,7 +2379,9 @@ void CWriter::visitInlineAsm(CallInst &CI) { if (I + 1 != E) Out << ","; } - Out << "\n :" << (Clobber.size() ? Clobber.substr(1) : "") << ")\n"; + if (Clobber.size()) + Out << "\n :" << Clobber.substr(1); + Out << ")"; } void CWriter::visitMallocInst(MallocInst &I) { diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 89ed2ad021a..fa869db6aa3 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -2379,7 +2379,9 @@ void CWriter::visitInlineAsm(CallInst &CI) { if (I + 1 != E) Out << ","; } - Out << "\n :" << (Clobber.size() ? Clobber.substr(1) : "") << ")\n"; + if (Clobber.size()) + Out << "\n :" << Clobber.substr(1); + Out << ")"; } void CWriter::visitMallocInst(MallocInst &I) {