diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-01-20 06:09:53 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-01-20 06:09:53 +0000 |
commit | 066515feea9af5319c138ff4db99081c7686c5b1 (patch) | |
tree | 2e9cff6137c807c9ce2e74be50e02ec8e26f4a0b /lib/Frontend/InitPreprocessor.cpp | |
parent | b3ee1df5a4d0db50f862a123bc7b404db2c22ab8 (diff) |
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93981 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/InitPreprocessor.cpp')
-rw-r--r-- | lib/Frontend/InitPreprocessor.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp index e4c380ae0e..f2eb4e642b 100644 --- a/lib/Frontend/InitPreprocessor.cpp +++ b/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__"); |