[cfe-commits] r61298 - /cfe/trunk/lib/CodeGen/CGStmt.cpp
Eli Friedman
eli.friedman at gmail.com
Sat Dec 20 17:15:34 PST 2008
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 =
More information about the cfe-commits
mailing list