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) {
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);
}