From: Daniel Dunbar Date: Wed, 20 Jan 2010 06:09:53 +0000 (+0000) Subject: Fix an invalid Twine use spotty by abbeyj, it isn't safe to use Twine X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=066515feea9af5319c138ff4db99081c7686c5b1;p=clang 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 --- 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__");