scott.linder added inline comments.

================
Comment at: clang/test/Driver/debug-options.c:364-366
+// GEMBED_2:  warning: debug information option '-gembed-source' is not 
supported for target
 // NOGEMBED_5-NOT:  "-gembed-source"
+// NOGEMBED_2-NOT:  warning: debug information option '-gembed-source' is not 
supported for target
----------------
dblaikie wrote:
> This is a bit of a loss in fidelity - might need a new diagnostic message (or 
> go hunting around for a more general purpose one than this one at least) to 
> say '-gembed-source' is ignored when not using DWARFv5. (in the nvptx case 
> it's "not supported on target", but in the existing cases covered by this 
> test it's "not supported because the user requested DWARFv2", for instance)
> 
> @JDevlieghere & @scott.linder for thoughts on this.
I agree that I'd prefer we detect whether the target-specific clamped version 
is to blame (and use the proposed warning message) or the original DWARF 
version is to blame (and use the old message).

If I were compiling for x86 and gave e.g. `-gdwarf-4 -gembed-source` and the 
error said "not supported by target" I'd probably get the wrong idea.

It would also be nice to retain the error semantics in the case where the user 
is explicitly requesting incompatible options.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92617/new/

https://reviews.llvm.org/D92617

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to