[PATCH] D92617: [DWARF] Allow toolchain to adjust specified DWARF version.

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 8 21:20:49 PST 2020


dblaikie added inline comments.


================
Comment at: clang/test/Driver/cuda-unsupported-debug-options.cu:18
+// RUN: %clang -### -target x86_64-linux-gnu -c %s -gdwarf-5 -gembed-source 2>&1 | FileCheck %s --check-prefix=DWARF-CLAMP
+// CHECK: debug information option '{{-gz|-fdebug-info-for-profiling|-gsplit-dwarf|-glldb|-gcodeview|-gmodules|-gembed-source|-fdebug-macro|-ggnu-pubnames|-gdwarf-aranges|-fdebug-types-section}}' is not supported{{.*}} target 'nvptx64-nvidia-cuda'
 // CHECK-NOT: debug information option '{{.*}}' is not supported for target 'x86
----------------
tra wrote:
> dblaikie wrote:
> > What's the purpose of the {{.*}} in this line? 
> The wildcard eats the differences between two warnings -- a generic one:
>  - `warning: debug information option '-glldb' is not supported for target 'nvptx64-nvidia-cuda'` 
> and the more specific one for `-gembed-source` : 
>  - `warning: debug information option '-gembed-source' is not supported. It needs DWARF-5 but target 'nvptx64-nvidia-cuda' only provides DWARF-2.`
> 
> 
Is that necessary? Or is the -gembed-source+CHECK test redundant with/less precise than the -gembed-source+DWARF-CLAMP test? (ie: would it be effective (not a loss in test coverage) to remove the gembed-source+CHECK test and only have the gembed-source+DWARF-CLAMP test, and keep the CHECK line precise as it was before for all the CHECK tests)

Effectively: Rather than adding a new RUN line, and generalizing the CHECK over the new/old message and checking the new message separately - instead, change the existing gembed-source test to use DWARF-CLAMP instead of CHECK, and leave everything the same?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92617



More information about the cfe-commits mailing list