This is an archive of the discontinued LLVM Phabricator instance.

Move DWARFRecordSectionSplitter code to its own file
ClosedPublic

Authored by rastogishubham on Mar 15 2022, 11:08 AM.

Details

Summary

With 229d576b31f4071ab68c85ac4fabb78cfa502b04 the class EHFrameSplitter was renamed to DWARFRecordSectionSplitter. This change merely moves it to it's own .cpp/.h file

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMar 15 2022, 11:08 AM
rastogishubham requested review of this revision.Mar 15 2022, 11:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 15 2022, 11:08 AM

Add newlines to the ends of DWARFRecordSectionSplitter.h/.cpp

aprantl accepted this revision.Mar 15 2022, 11:16 AM

This is generally fine, I have a few nitpicks inline :-)

llvm/include/llvm/ExecutionEngine/JITLink/DWARFRecordSectionSplitter.h
2

typo: Splittert

13

I don't think this is needed. All the types could be forward-declared (they are just used as references here).

14

what is this needed for?

This revision is now accepted and ready to land.Mar 15 2022, 11:16 AM
rastogishubham marked an inline comment as done.Mar 15 2022, 11:20 AM
rastogishubham added inline comments.
llvm/include/llvm/ExecutionEngine/JITLink/DWARFRecordSectionSplitter.h
13

This include is also here because of the cpp file which requires this include, should I move this to the cpp file?

14

This is needed because in the cpp file it creates a BinaryStreamReader, should I move the include to the cpp file instead?

llvm/lib/ExecutionEngine/JITLink/DWARFRecordSectionSplitter.cpp:76

BinaryStreamReader BlockReader(
      StringRef(B.getContent().data(), B.getContent().size()),
      G.getEndianness());
llvm/include/llvm/ExecutionEngine/JITLink/DWARFRecordSectionSplitter.h
13

Hmm, I was wrong, but the forward declaration will not work here because it also uses a nested class which I do not think can be forward declared

Made changes as pointed out by Adrian

This revision was landed with ongoing or failed builds.Mar 15 2022, 11:39 AM
This revision was automatically updated to reflect the committed changes.