Add a -disable-cfi option to llvm-mc. This is useful for debugging as

it will expand any .cfi_* directives in the input assembly.

Unfortunately this cannot replace elf-dump in tests as the asm streamer
cannot relax the line advance opcodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168522 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2012-11-23 17:37:34 +00:00
parent c8fec7e21f
commit 985884caf9

View File

@ -68,6 +68,9 @@ OutputAsmVariant("output-asm-variant",
static cl::opt<bool>
RelaxAll("mc-relax-all", cl::desc("Relax all fixups"));
static cl::opt<bool>
DisableCFI("disable-cfi", cl::desc("Do not use .cfi_* directives"));
static cl::opt<bool>
NoExecStack("mc-no-exec-stack", cl::desc("File doesn't need an exec stack"));
@ -415,9 +418,10 @@ int main(int argc, char **argv) {
CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx);
MAB = TheTarget->createMCAsmBackend(TripleName, MCPU);
}
bool UseCFI = !DisableCFI;
Str.reset(TheTarget->createAsmStreamer(Ctx, FOS, /*asmverbose*/true,
/*useLoc*/ true,
/*useCFI*/ true,
UseCFI,
/*useDwarfDirectory*/ true,
IP, CE, MAB, ShowInst));