[Openmp-commits] [PATCH] D116959: [DWARF] Try not to crash for codes with missing debug information

David Blaikie via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jan 19 09:44:12 PST 2022

dblaikie added a comment.

Ah, so the entry point to the problematic caller (emitInitialRawDwarfLocDirective) is NVPTX-specific, it seems. And hadn't been tested with a Module that contained a DICompileUnit and also contained at least one Function without a DISubprogram attachment? OK. Will be good to have that test case added (I guess it probably doesn't need any instructions in the function, unless that's the minimum necessary to have a valid NVPTX function?)

I would wonder why NVPTX has this unique codepath, but this probably isn't the place to relitigate that design decision (though maybe some comments in emitInitialRawDwarfLocDirective would be helpful to explain the circumstances).

I /think/ it'd be more suitable for the subprogram check to be a layer up, in the emitInitialRawDwarfLocDirective function - similar to the other, more mainstream/used by other targets, call to emitInitialLocDirective that only call it when the function has a subprogram attached.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list