diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index f7c3748f079..8329a41f252 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -68,6 +68,9 @@ OutputAsmVariant("output-asm-variant", static cl::opt RelaxAll("mc-relax-all", cl::desc("Relax all fixups")); +static cl::opt +DisableCFI("disable-cfi", cl::desc("Do not use .cfi_* directives")); + static cl::opt 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));