mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +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:
@ -432,7 +432,7 @@ int main(int argc, char **argv) {
|
||||
MCAsmBackend *MAB = 0;
|
||||
if (ShowEncoding) {
|
||||
CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx);
|
||||
MAB = TheTarget->createMCAsmBackend(TripleName, MCPU);
|
||||
MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, MCPU);
|
||||
}
|
||||
bool UseCFI = !DisableCFI;
|
||||
Str.reset(TheTarget->createAsmStreamer(Ctx, FOS, /*asmverbose*/true,
|
||||
@ -446,7 +446,7 @@ int main(int argc, char **argv) {
|
||||
} else {
|
||||
assert(FileType == OFT_ObjectFile && "Invalid file type!");
|
||||
MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx);
|
||||
MCAsmBackend *MAB = TheTarget->createMCAsmBackend(TripleName, MCPU);
|
||||
MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, MCPU);
|
||||
Str.reset(TheTarget->createMCObjectStreamer(TripleName, Ctx, *MAB,
|
||||
FOS, CE, RelaxAll,
|
||||
NoExecStack));
|
||||
|
Reference in New Issue
Block a user