mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 22:04:55 +00:00
My attempt at fixing the leak reported by the valgrind buildbots. Valgrind will
still report leaks, but they're spurious now. Valgrind cannot peer into std::vector objects--or any dynamic array, for that matter--because it doesn't know how big the array is. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132174 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c2d3022aa6
commit
4eeb7b662b
@ -28,6 +28,8 @@ MCStreamer::MCStreamer(MCContext &Ctx) : Context(Ctx), EmitEHFrame(true),
|
||||
}
|
||||
|
||||
MCStreamer::~MCStreamer() {
|
||||
for (unsigned i = 0; i < getNumW64UnwindInfos(); ++i)
|
||||
delete W64UnwindInfos[i];
|
||||
}
|
||||
|
||||
const MCExpr *MCStreamer::BuildSymbolDiff(MCContext &Context,
|
||||
@ -321,7 +323,7 @@ void MCStreamer::EmitWin64EHStartProc(const MCSymbol *Symbol) {
|
||||
MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
|
||||
if (CurFrame && !CurFrame->End)
|
||||
report_fatal_error("Starting a function before ending the previous one!");
|
||||
MCWin64EHUnwindInfo *Frame = new (getContext()) MCWin64EHUnwindInfo;
|
||||
MCWin64EHUnwindInfo *Frame = new MCWin64EHUnwindInfo;
|
||||
Frame->Begin = getContext().CreateTempSymbol();
|
||||
Frame->Function = Symbol;
|
||||
EmitLabel(Frame->Begin);
|
||||
@ -339,7 +341,7 @@ void MCStreamer::EmitWin64EHEndProc() {
|
||||
|
||||
void MCStreamer::EmitWin64EHStartChained() {
|
||||
EnsureValidW64UnwindInfo();
|
||||
MCWin64EHUnwindInfo *Frame = new (getContext()) MCWin64EHUnwindInfo;
|
||||
MCWin64EHUnwindInfo *Frame = new MCWin64EHUnwindInfo;
|
||||
MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
|
||||
Frame->Begin = getContext().CreateTempSymbol();
|
||||
Frame->Function = CurFrame->Function;
|
||||
|
Loading…
Reference in New Issue
Block a user