Author: efriedma
Date: Sat Dec 20 19:15:32 2008
New Revision: 61298

URL: http://llvm.org/viewvc/llvm-project?rev=61298&view=rev
Log:
Fix for PR3246: an empty clobber list is the empty string, not a null 
string.

That said, we should probably try and track down the correct clobber 
lists for the targets that don't have them (PPC, ARM, and Sparc), 
so that we can generate correct code.


Modified:
    cfe/trunk/lib/CodeGen/CGStmt.cpp

Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=61298&r1=61297&r2=61298&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Sat Dec 20 19:15:32 2008
@@ -1004,10 +1004,11 @@
   }
   
   // Add machine specific clobbers
-  if (const char *C = Target.getClobbers()) {
+  std::string MachineClobbers = Target.getClobbers();
+  if (!MachineClobbers.empty()) {
     if (!Constraints.empty())
       Constraints += ',';
-    Constraints += C;
+    Constraints += MachineClobbers;
   }
     
   const llvm::FunctionType *FTy = 


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to