[PATCH] D82435: [DWARFYAML][debug_gnu_*] Add the missing context `IsGNUStyle`. NFC.

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 24 02:40:13 PDT 2020


Higuoxing added a comment.

In D82435#2110862 <https://reviews.llvm.org/D82435#2110862>, @jhenderson wrote:

> You need some form of testing for this. You might want to use Mach-O for testing it in this case.


Unfortunately, yaml2macho doesn't support emitting the .debug_gnu_pub* sections :-(
What about using unit test here?

In D82435#2110879 <https://reviews.llvm.org/D82435#2110879>, @grimar wrote:

> Such approach generally feels unsafe. Should we instead introduce some struct, lets say `DWARFContext` which will be:
>
>   struct DWARFContext {
>     DWARFYAML::PubSection* Section;
>     bool IsGNUStyle;
>   }
>
>
> so that we'll always know that `getContext` returns `DWARFContext*`?


Good idea! I'll have a try.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82435





More information about the llvm-commits mailing list