[llvm] [Object] Beginnings of SFrame parser and dumper (PR #147294)
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 15 03:23:08 PDT 2025
================
@@ -6428,6 +6432,55 @@ template <typename ELFT> void ELFDumper<ELFT>::printMemtag() {
printMemtag(DynamicEntries, AndroidNoteDesc, GlobalDescriptors);
}
+template <typename ELFT>
+void ELFDumper<ELFT>::printSectionsAsSFrame(ArrayRef<std::string> Sections) {
+ constexpr endianness E = ELFT::Endianness;
+ for (object::SectionRef Section :
+ getSectionRefsByNameOrIndex(ObjF, Sections)) {
+ StringRef SectionName = unwrapOrError(FileName, Section.getName());
+ W.getOStream() << '\n';
+ W.startLine() << "Contents of SFrame section '" << SectionName << "':\n";
----------------
labath wrote:
It is not. It's a left over from when I was trying to match GNU output format. I've fixed it now.
Any thoughts on testing the json output? Repeating all of the expectations for json output is rather.. repetitive, and it doesn't really ensure the output is valid json. Is there any way to assert that the output parses as json?
https://github.com/llvm/llvm-project/pull/147294
More information about the llvm-commits
mailing list