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
5.2 KiB
5.2 KiB