mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 22:30:13 +00:00
[NVPTX] Fix debugging information being added to NVPTX target if remarks are enabled
Summary: Optimized debugging is not supported by ptxas. Debugging information is degraded to line information only if optimizations are enabled, but debugging information would be added back in by the driver if remarks were enabled. This solves https://bugs.llvm.org/show_bug.cgi?id=48153. Reviewers: jdoerfert tra jholewinski serge-sans-paille Differential Revision: https://reviews.llvm.org/D94123
This commit is contained in:
parent
90347ab96f
commit
1ca5e68aa0
@ -3940,14 +3940,14 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D,
|
||||
CmdArgs.push_back("-gno-inline-line-tables");
|
||||
}
|
||||
|
||||
// Adjust the debug info kind for the given toolchain.
|
||||
TC.adjustDebugInfoKind(DebugInfoKind, Args);
|
||||
|
||||
// When emitting remarks, we need at least debug lines in the output.
|
||||
if (willEmitRemarks(Args) &&
|
||||
DebugInfoKind <= codegenoptions::DebugDirectivesOnly)
|
||||
DebugInfoKind = codegenoptions::DebugLineTablesOnly;
|
||||
|
||||
// Adjust the debug info kind for the given toolchain.
|
||||
TC.adjustDebugInfoKind(DebugInfoKind, Args);
|
||||
|
||||
RenderDebugEnablingArgs(Args, CmdArgs, DebugInfoKind, EffectiveDWARFVersion,
|
||||
DebuggerTuning);
|
||||
|
||||
|
@ -384,7 +384,7 @@ static DeviceDebugInfoLevel mustEmitDebugInfo(const ArgList &Args) {
|
||||
}
|
||||
return IsDebugEnabled ? EmitSameDebugInfoAsHost : DebugDirectivesOnly;
|
||||
}
|
||||
return DisableDebugInfo;
|
||||
return willEmitRemarks(Args) ? DebugDirectivesOnly : DisableDebugInfo;
|
||||
}
|
||||
|
||||
void NVPTX::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
|
Loading…
Reference in New Issue
Block a user