[PATCH] D89463: [yaml2obj][ELF] - Simplify the code that performs sections validation.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 15 16:50:40 PDT 2020


MaskRay added a comment.

> Implements one of approaches discussed in the D89039 <https://reviews.llvm.org/D89039> thread, which allows to generalize sections validation.

Probably just copy some messages from https://reviews.llvm.org/D89039#inline-828862 to make the description self-contained

In short, this moves a bunch of checks from MappingTraits<std::unique_ptr<ELFYAML::Chunk>>::validate to `*::getEntries`



================
Comment at: llvm/lib/ObjectYAML/DWARFYAML.cpp:311
     return "Entries and Content can't be used together";
-  return StringRef();
+  return "";
 }
----------------
Seems inconsistent with `{}` you use below..


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

https://reviews.llvm.org/D89463



More information about the llvm-commits mailing list