Skip to content

Commit

Permalink
Allow limited debug info
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
linehill authored and franz committed Aug 25, 2023
1 parent 73a93b1 commit 61c6190
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clang/lib/Driver/ToolChains/HIPSPV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ VersionTuple HIPSPVToolChain::computeMSVCVersion(const Driver *D,
void HIPSPVToolChain::adjustDebugInfoKind(
llvm::codegenoptions::DebugInfoKind &DebugInfoKind,
const llvm::opt::ArgList &Args) const {
// Debug info generation is disabled for SPIRV-LLVM-Translator
// which currently aborts on the presence of DW_OP_LLVM_convert.
// TODO: Enable debug info when the SPIR-V backend arrives.
DebugInfoKind = llvm::codegenoptions::NoDebugInfo;

// Restrict the debug info to a kind compatible with llvm-spirv.
if (DebugInfoKind > llvm::codegenoptions::DebugLineTablesOnly)
DebugInfoKind = llvm::codegenoptions::DebugLineTablesOnly;
}

0 comments on commit 61c6190

Please sign in to comment.