I'm pretty sure I was referencing destroyed temporaries here. I'm open
to suggestions on how to write this better.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206804
91177308-0d34-0410-b5e6-
96231b3b80d8
// x64 as well as x86, even though they have no effect.
const char *CCs[] = {"cdecl", "stdcall", "fastcall", "thiscall", "pascal"};
for (const char *CC : CCs) {
- Twine GCCSpelling = Twine("__attribute__((__") + CC + Twine("__))");
+ std::string GCCSpelling = "__attribute__((__";
+ GCCSpelling += CC;
+ GCCSpelling += "__))";
Builder.defineMacro(Twine("_") + CC, GCCSpelling);
Builder.defineMacro(Twine("__") + CC, GCCSpelling);
}