summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2008-12-21 01:15:32 +0000
committerEli Friedman <eli.friedman@gmail.com>2008-12-21 01:15:32 +0000
commitdea4193e8a629762b5e53647599170360182869c (patch)
tree01510133ee34387315c8a3af478be40fd4069b7b /clang/lib/CodeGen/CGStmt.cpp
parent10eb8e533f753391f935923bc248a491deb297da (diff)
downloadbcm5719-llvm-dea4193e8a629762b5e53647599170360182869c.tar.gz
bcm5719-llvm-dea4193e8a629762b5e53647599170360182869c.zip
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. llvm-svn: 61298
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index f84f6a630f3..794d7cb272a 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -1004,10 +1004,11 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
}
// 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 =
OpenPOWER on IntegriCloud