gcc doesn't like an empty colbber list
authorAndrew Lenharth <andrewl@lenharth.org>
Tue, 28 Nov 2006 23:07:32 +0000 (23:07 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Tue, 28 Nov 2006 23:07:32 +0000 (23:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31987 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp

index 89ed2ad021a95d0fcea675c66ea8ef245c7f1c7d..fa869db6aa34cfe16a3585a561519aa01cbe84e9 100644 (file)
@@ -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) {
index 89ed2ad021a95d0fcea675c66ea8ef245c7f1c7d..fa869db6aa34cfe16a3585a561519aa01cbe84e9 100644 (file)
@@ -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) {