================
@@ -227,6 +230,18 @@ class EmbedDXILPass : public llvm::ModulePass {
legalizeLifetimeIntrinsics(M);
bool HasDebugInfo = !M.debug_compile_units().empty();
+
+ // Enable EmbedDebug if there is debug info, but it is not being written
+ // to a PDB file.
+ if (HasDebugInfo && !EmbedDebug && PdbDebugPath.empty())
+ EmbedDebug = true;
+ if (!HasDebugInfo && EmbedDebug)
+ reportFatalUsageError(
+ "Missing debug info for embedding into the container");
+ // TODO: move this check to DXContainerPDB.cpp when /Zs is implemented.
+ if (!HasDebugInfo && !PdbDebugPath.empty())
+ reportFatalUsageError("Missing debug info for writing to the PDB file");
----------------
kuilpd wrote:
Yeah, the question still stands. We wanted the logic for flags specifically in
the backend to be able to check their behavior with `llc`, and also to keep the
Driver code simpler by just forwarding the options to the backend.
https://github.com/llvm/llvm-project/pull/204166
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits