diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-07-14 17:11:20 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-07-14 17:11:20 +0000 |
| commit | 73064e142928357f369da6f66e607b2b85fe8581 (patch) | |
| tree | c7ff5162e813f30091c1e3e64bc2c9952fedb663 /llvm | |
| parent | 0aad92e0d6990c15d190a46535201fc0bf507870 (diff) | |
| download | bcm5719-llvm-73064e142928357f369da6f66e607b2b85fe8581.tar.gz bcm5719-llvm-73064e142928357f369da6f66e607b2b85fe8581.zip | |
Remove GCC 3.3 workaround
llvm-svn: 212960
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/CodeGen/MachineFunction.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h index f4c2542b990..042c62b4a88 100644 --- a/llvm/include/llvm/CodeGen/MachineFunction.h +++ b/llvm/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<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); } |

