Skip to content

Commit 6161a08

Browse files
Henry LinjamäkiPekka Jääskeläinen
authored andcommitted
Allow limited debug info
Allow debug info kind that is compatible with llvm-spirv, that is, it is limited to a kind with an intent to avoid emitting DW_OP_LLVM_<op> expressions.
1 parent 5fea93f commit 6161a08

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/lib/Driver/ToolChains/HIPSPV.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ VersionTuple HIPSPVToolChain::computeMSVCVersion(const Driver *D,
287287
void HIPSPVToolChain::adjustDebugInfoKind(
288288
codegenoptions::DebugInfoKind &DebugInfoKind,
289289
const llvm::opt::ArgList &Args) const {
290-
// Debug info generation is disabled for SPIRV-LLVM-Translator
291-
// which currently aborts on the presence of DW_OP_LLVM_convert.
292-
// TODO: Enable debug info when the SPIR-V backend arrives.
293-
DebugInfoKind = codegenoptions::NoDebugInfo;
290+
291+
// Restrict the debug info to a kind compatible with llvm-spirv.
292+
if (DebugInfoKind > codegenoptions::DebugLineTablesOnly)
293+
DebugInfoKind = codegenoptions::DebugLineTablesOnly;
294294
}

0 commit comments

Comments
 (0)