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

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 30 06:28:33 PDT 2020


Higuoxing marked an inline comment as done.
Higuoxing added inline comments.


================
Comment at: llvm/unittests/ObjectYAML/DWARFYAMLTest.cpp:77
+  auto SectionsOrErr = DWARFYAML::emitDebugSections(Yaml);
+  EXPECT_THAT_EXPECTED(SectionsOrErr, Succeeded());
+}
----------------
jhenderson wrote:
> Higuoxing wrote:
> > jhenderson wrote:
> > > I think in the two passing cases, it would be good to check the value of the `Descriptor` field in the `Entries`. Ideally, I'd also test the other fields in tha YAML, but that might be outside the scope of this change, and better deferred to a later change.
> > > it would be good to check the value of the Descriptor field in the Entries
> > 
> > Thanks, I want to do it as well. Can we use DWARF parser in lib/DebugInfo here?
> I'd be slightly reluctant to do so, as there's a risk of circular testing again. Are the actual YAML data structures not available at this point then?
Yes, the actual YAML data structure isn't available yet. `DWARFYAML::emitDebugSections()` returns `StringMap<std::unique_ptr<MemoryBuffer>>`. What do you think of having another function that returns the parsed YAML structure for unit testing?


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