mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
Generate compact unwind encoding from CFI directives.
We used to generate the compact unwind encoding from the machine instructions. However, this had the problem that if the user used `-save-temps' or compiled their hand-written `.s' file (with CFI directives), we wouldn't generate the compact unwind encoding. Move the algorithm that generates the compact unwind encoding into the MCAsmBackend. This way we can generate the encoding whether the code is from a `.ll' or `.s' file. <rdar://problem/13623355> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190290 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -178,7 +178,7 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
|
||||
MCAsmBackend *MAB = 0;
|
||||
if (ShowMCEncoding) {
|
||||
MCE = getTarget().createMCCodeEmitter(MII, MRI, STI, *Context);
|
||||
MAB = getTarget().createMCAsmBackend(getTargetTriple(), TargetCPU);
|
||||
MAB = getTarget().createMCAsmBackend(MRI, getTargetTriple(), TargetCPU);
|
||||
}
|
||||
|
||||
MCStreamer *S = getTarget().createAsmStreamer(*Context, Out,
|
||||
@@ -197,7 +197,7 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
|
||||
// emission fails.
|
||||
MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(MII, MRI, STI,
|
||||
*Context);
|
||||
MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple(),
|
||||
MCAsmBackend *MAB = getTarget().createMCAsmBackend(MRI, getTargetTriple(),
|
||||
TargetCPU);
|
||||
if (MCE == 0 || MAB == 0)
|
||||
return true;
|
||||
@@ -271,7 +271,8 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM,
|
||||
const MCSubtargetInfo &STI = getSubtarget<MCSubtargetInfo>();
|
||||
MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(*getInstrInfo(), MRI,
|
||||
STI, *Ctx);
|
||||
MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple(), TargetCPU);
|
||||
MCAsmBackend *MAB = getTarget().createMCAsmBackend(MRI, getTargetTriple(),
|
||||
TargetCPU);
|
||||
if (MCE == 0 || MAB == 0)
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user