Don't create non-temporary twines.

llvm-svn: 213066
This commit is contained in:
Joerg Sonnenberger
2014-07-15 12:18:40 +00:00
parent 62277b37db
commit cc43c85855

View File

@@ -201,9 +201,8 @@ static void DefineFmt(const Twine &Prefix, TargetInfo::IntType Ty,
bool IsSigned = TI.isTypeSigned(Ty);
StringRef FmtModifier = TI.getTypeFormatModifier(Ty);
for (const char *Fmt = IsSigned ? "di" : "ouxX"; *Fmt; ++Fmt) {
Twine Macro = Prefix + "_FMT" + Twine(*Fmt) + "__";
Twine Value = Twine("\"") + FmtModifier + Twine(*Fmt) + "\"";
Builder.defineMacro(Macro, Value);
Builder.defineMacro(Prefix + "_FMT" + Twine(*Fmt) + "__",
Twine("\"") + FmtModifier + Twine(*Fmt) + "\"");
}
}