[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. The fix will initialize the passes by calling createPassConfig. Also ignore global variable which not has section in DXILAsmPrinter::emitGlobalVariable to avoid hit llvm_unreachable in DXILTargetObjectFile::SelectSectionForGlobal. Reviewed By: beanz Differential Revision: https://reviews.llvm.org/D130856
Loading
Please sign in to comment