aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorJez Ng <jezng@fb.com>2022-06-12 17:15:56 -0400
committerJez Ng <jezng@fb.com>2022-06-12 17:24:19 -0400
commitd4bcb45db78dc7ca371224cb01bea8dcb14e0698 (patch)
tree69b902b11a6c33ee526572764d938dabb2e3969b /llvm/lib/CodeGen/LLVMTargetMachine.cpp
parent775a22e32a71b1592bcc254c1cfcb037ac944aa6 (diff)
downloadllvm-d4bcb45db78dc7ca371224cb01bea8dcb14e0698.zip
llvm-d4bcb45db78dc7ca371224cb01bea8dcb14e0698.tar.gz
llvm-d4bcb45db78dc7ca371224cb01bea8dcb14e0698.tar.bz2
[MC][re-land] Omit DWARF unwind info if compact unwind is present where eligible
This reverts commit d941d597837d9e1405086f008c9bd6a71e7263c9. Differential Revision: https://reviews.llvm.org/D122258
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index af05dbc..3192dcad 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -264,6 +264,9 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM, MCContext *&Ctx,
"Cannot emit MC with limited codegen pipeline");
Ctx = &MMIWP->getMMI().getContext();
+ // libunwind is unable to load compact unwind dynamically, so we must generate
+ // DWARF unwind info for the JIT.
+ Options.MCOptions.EmitDwarfUnwind = EmitDwarfUnwindType::Always;
if (Options.MCOptions.MCSaveTempLabels)
Ctx->setAllowTemporaryLabels(false);