summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-01-20 06:09:53 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-01-20 06:09:53 +0000
commit415763612ab7395d68a8d70c44edaad11bdee5ca (patch)
treea674c44b8913930d84011d4e1f0f7f249e38b2d6 /clang/lib/Frontend/InitPreprocessor.cpp
parentd6514b1e13dd87b9790c3eed70cdb82157d59392 (diff)
downloadbcm5719-llvm-415763612ab7395d68a8d70c44edaad11bdee5ca.tar.gz
bcm5719-llvm-415763612ab7395d68a8d70c44edaad11bdee5ca.zip
Fix an invalid Twine use spotty by abbeyj, it isn't safe to use Twine
temporaries (this is one reason I'm nervous about propagating their use beyond particularly performance critical places). llvm-svn: 93981
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r--clang/lib/Frontend/InitPreprocessor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index e4c380ae0ed..f2eb4e642be 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -137,7 +137,10 @@ static void DefineFloatMacros(MacroBuilder &Builder, llvm::StringRef Prefix,
"1.79769313486231580793728971405301e+308L",
"1.18973149535723176508575932662800702e+4932L");
- llvm::Twine DefPrefix = "__" + Prefix + "_";
+ llvm::SmallString<32> DefPrefix;
+ DefPrefix = "__";
+ DefPrefix += Prefix;
+ DefPrefix += "_";
Builder.defineMacro(DefPrefix + "DENORM_MIN__", DenormMin);
Builder.defineMacro(DefPrefix + "HAS_DENORM__");
OpenPOWER on IntegriCloud