Remove GCC 3.3 workaround
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 14 Jul 2014 17:11:20 +0000 (17:11 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 14 Jul 2014 17:11:20 +0000 (17:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212960 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineFunction.h

index f4c2542b990de42d4a17e46f47ace590b7cde95b..042c62b4a887f2f513fdafa2791e0311e4611e80 100644 (file)
@@ -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<typename Ty>
   Ty *getInfo() {
-    if (!MFInfo) {
-        // This should be just `new (Allocator.Allocate<Ty>()) Ty(*this)', but
-        // that apparently breaks GCC 3.3.
-        Ty *Loc = static_cast<Ty*>(Allocator.Allocate(sizeof(Ty),
-                                                      AlignOf<Ty>::Alignment));
-        MFInfo = new (Loc) Ty(*this);
-    }
+    if (!MFInfo)
+      MFInfo = new (Allocator.Allocate<Ty>()) Ty(*this);
     return static_cast<Ty*>(MFInfo);
   }