dblaikie added inline comments.

================
Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:296
+def warn_drv_dwarf_version_limited_by_target : Warning<
+  "debug information option '%0' is not supported. It needs DWARF-%2 but 
target '%1' only provides DWARF-%3.">,
+  InGroup<UnsupportedTargetOpt>;
----------------
Probably worth testing the rest of this error message to check the versions and 
target names all show up as intended (looks like the test currently glosses 
over the differences between this warning and the other error?) - and also 
testing that it's emitted as a warning, whereas the other/pre-existing 
diagnostic was emitted as an error (oh, I guess perhaps it already is, just in 
another file - could you check that it is tested narrowly/ensured it's an error 
elsewhere?)


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3928-3929
           << A->getAsString(Args) << "-gdwarf-5";
-    else if (checkDebugInfoOption(A, Args, D, TC))
-      CmdArgs.push_back("-gembed-source");
+    else {
+      if (EffectiveDWARFVersion < 5)
+        // The toolchain has reduced allowed dwarf version, so we can't enable
----------------
Use "else if {" on one line here, perhaps? 


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