From 550c76dbd68abc17cd32c859de3c24de94ad5cb3 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 9 Sep 2013 19:48:37 +0000 Subject: Call generateCompactUnwindEncodings() right before we need to output the frame information. There are more than one paths to where the frame information is emitted. Place the call to generateCompactUnwindEncodings() into the method which outputs the frame information, thus ensuring that the encoding is there for every path. This involved threading the MCAsmBackend object through to this method. llvm-svn: 190335 --- llvm/lib/CodeGen/LLVMTargetMachine.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index 6fd68ee7750..5699511a4de 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp @@ -175,12 +175,11 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM, // Create a code emitter if asked to show the encoding. MCCodeEmitter *MCE = 0; - MCAsmBackend *MAB = 0; - if (ShowMCEncoding) { + if (ShowMCEncoding) MCE = getTarget().createMCCodeEmitter(MII, MRI, STI, *Context); - MAB = getTarget().createMCAsmBackend(MRI, getTargetTriple(), TargetCPU); - } + MCAsmBackend *MAB = getTarget().createMCAsmBackend(MRI, getTargetTriple(), + TargetCPU); MCStreamer *S = getTarget().createAsmStreamer(*Context, Out, getVerboseAsm(), hasMCUseLoc(), -- cgit v1.2.3