mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-29 13:29:28 +00:00
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:
parent
5335b49f96
commit
8e44dbb0ef
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user