================
@@ -2253,6 +2253,14 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions
&Opts, ArgList &Args,
Opts.getDebugInfo() == llvm::codegenoptions::NoDebugInfo)
Opts.setDebugInfo(llvm::codegenoptions::LocTrackingOnly);
+ // Debug mode for inlining chain diagnostics requires at least
+ // -gline-directives-only to track inlining locations via DILocation.
+ if (Opts.getInliningChain() == CodeGenOptions::Inlining_Debug &&
+ Opts.getDebugInfo() < llvm::codegenoptions::DebugDirectivesOnly) {
+ Diags.Report(diag::warn_fe_inlining_debug_requires_g);
+ Opts.setInliningChain(CodeGenOptions::Inlining_Heuristic);
+ }
----------------
JustinStitt wrote:
Ok done with [`e866945`
(#174892)](https://github.com/llvm/llvm-project/pull/174892/commits/e866945f1c61774e745ec3a793629104ef473fee)
although it can get a bit noisy when there are multiple diagnostics. Should I
try to engineer some EmitOnce or does something like that already exist?
https://github.com/llvm/llvm-project/pull/174892
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits