[PATCH] D83282: [DWARFYAML] Refactor: Pull out member functions to DWARFYAMLUtils.cpp.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 7 01:34:08 PDT 2020


grimar added a comment.

So, currently, for example, `DWARFYAML::Data` is defined in `DWARFYAML.h`
(https://github.com/llvm/llvm-project/blob/master/llvm/include/llvm/ObjectYAML/DWARFYAML.h#L180) and implemented in `DWARFYAML.cpp`.

With this change the implementation of members is moved to a new `DWARFYAMLUtils.cpp` file. I.e. we have `DWARFYAML.h` + `DWARFYAMLUtils.cpp` with this patch.
Honestly, it looks a bit unnatural to me, because it breaks the straightforward common approach: "define in a header, implement in a cpp with the same name".

You're saying that "In the future, we will add some helper functions that make DWARF sections interlinked". Perhaps I'd wait for these functions to appear and may be
then create `DWARFYAMLUtils.h` + `DWARFYAMLUtils.cpp` for them.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83282





More information about the llvm-commits mailing list