From 0840c823e4b431e2405ec2fa12f619d37ae0f0f7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 12 Oct 2009 04:22:44 +0000 Subject: [PATCH] Fix PR5087, patch by Jakub Staszak! llvm-svn: 83822 --- llvm/lib/CodeGen/MachineFunctionAnalysis.cpp | 1 + llvm/lib/Target/X86/X86CodeEmitter.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/MachineFunctionAnalysis.cpp b/llvm/lib/CodeGen/MachineFunctionAnalysis.cpp index ae9d5a99c04d..56294d90398f 100644 --- a/llvm/lib/CodeGen/MachineFunctionAnalysis.cpp +++ b/llvm/lib/CodeGen/MachineFunctionAnalysis.cpp @@ -30,6 +30,7 @@ MachineFunctionAnalysis::MachineFunctionAnalysis(TargetMachine &tm, } MachineFunctionAnalysis::~MachineFunctionAnalysis() { + releaseMemory(); assert(!MF && "MachineFunctionAnalysis left initialized!"); } diff --git a/llvm/lib/Target/X86/X86CodeEmitter.cpp b/llvm/lib/Target/X86/X86CodeEmitter.cpp index 6527dd70d925..f942f3f85107 100644 --- a/llvm/lib/Target/X86/X86CodeEmitter.cpp +++ b/llvm/lib/Target/X86/X86CodeEmitter.cpp @@ -587,8 +587,8 @@ void Emitter::emitInstruction(const MachineInstr &MI, case TargetInstrInfo::INLINEASM: // We allow inline assembler nodes with empty bodies - they can // implicitly define registers, which is ok for JIT. - assert(MI.getOperand(0).getSymbolName()[0] == 0 && - "JIT does not support inline asm!"); + if (MI.getOperand(0).getSymbolName()[0]) + llvm_report_error("JIT does not support inline asm!"); break; case TargetInstrInfo::DBG_LABEL: case TargetInstrInfo::EH_LABEL: