Remove GCC 3.3 workaround

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212960 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matt Arsenault 2014-07-14 17:11:20 +00:00
parent 5335b49f96
commit 8e44dbb0ef

View File

@ -227,19 +227,14 @@ public:
void setHasInlineAsm(bool B) { void setHasInlineAsm(bool B) {
HasInlineAsm = B; HasInlineAsm = B;
} }
/// getInfo - Keep track of various per-function pieces of information for /// getInfo - Keep track of various per-function pieces of information for
/// backends that would like to do so. /// backends that would like to do so.
/// ///
template<typename Ty> template<typename Ty>
Ty *getInfo() { Ty *getInfo() {
if (!MFInfo) { if (!MFInfo)
// This should be just `new (Allocator.Allocate<Ty>()) Ty(*this)', but MFInfo = new (Allocator.Allocate<Ty>()) Ty(*this);
// that apparently breaks GCC 3.3.
Ty *Loc = static_cast<Ty*>(Allocator.Allocate(sizeof(Ty),
AlignOf<Ty>::Alignment));
MFInfo = new (Loc) Ty(*this);
}
return static_cast<Ty*>(MFInfo); return static_cast<Ty*>(MFInfo);
} }