From 8e44dbb0ef015648bbec0efde613d8d4a793b102 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 14 Jul 2014 17:11:20 +0000 Subject: [PATCH] Remove GCC 3.3 workaround git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212960 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineFunction.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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); } -- 2.34.1