[llvm] [Object] Beginnings of SFrame parser and dumper (PR #147294)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 16 01:31:12 PDT 2025


================
@@ -6428,6 +6432,62 @@ 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;
+    if (Error Err = Section.getName().moveInto(SectionName)) {
+      SectionName = "<error>";
----------------
jh7370 wrote:

Test case? By the way, the pattern we use elsewhere is `<?>` for this sort of situation.

https://github.com/llvm/llvm-project/pull/147294


More information about the llvm-commits mailing list