aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2006-11-28 23:07:32 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2006-11-28 23:07:32 +0000
commitf45148e113a213b8c91ce34a0b16aa35eb30c77a (patch)
tree9d2f2f88adfcb0f083a684d3224218db72e531fd
parenta21900d5a4a6522c453d7f346cb5be78bf52a8a0 (diff)
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
-rw-r--r--lib/Target/CBackend/CBackend.cpp4
-rw-r--r--lib/Target/CBackend/Writer.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 89ed2ad021..fa869db6aa 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 89ed2ad021..fa869db6aa 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) {