[PATCH] D130856: [NFC][DirectX backend] Fix crash when emit_obj for DirectX backend. When emit-obj from clang directly, DirectX backend will hit assert caused by not initialize passes for AsmPrinter.
Chris Bieneman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 1 16:45:20 PDT 2022
beanz added inline comments.
================
Comment at: llvm/lib/Target/DirectX/DirectXTargetMachine.cpp:75
+ if (TargetPassConfig::willCompleteCodeGenPipeline()) {
+ addPass(createDXILEmbedderPass());
+ }
----------------
this pass we should probably keep in the `addPassesToEmitFile` override. This needs to be done last before emitting an object file, so keeping it separate will reduce the likelihood of introducing errors.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130856/new/
https://reviews.llvm.org/D130856
More information about the llvm-commits
mailing list