diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index f4c2542b990..042c62b4a88 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -227,19 +227,14 @@ public: void setHasInlineAsm(bool B) { HasInlineAsm = B; } - + /// getInfo - Keep track of various per-function pieces of information for /// backends that would like to do so. /// template Ty *getInfo() { - if (!MFInfo) { - // This should be just `new (Allocator.Allocate()) Ty(*this)', but - // that apparently breaks GCC 3.3. - Ty *Loc = static_cast(Allocator.Allocate(sizeof(Ty), - AlignOf::Alignment)); - MFInfo = new (Loc) Ty(*this); - } + if (!MFInfo) + MFInfo = new (Allocator.Allocate()) Ty(*this); return static_cast(MFInfo); }