[PATCH] D99399: [elfabi] Prepare llvm-elfabi for elfabi/ifs merging.

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 3 12:24:16 PDT 2021


phosek accepted this revision.
phosek added a comment.
This revision is now accepted and ready to land.

This looks good to me modulo a few nits although you may also want to wait for thumbs up from @plotfi and @compnerd.



================
Comment at: llvm/lib/InterfaceStub/ELFObjHandler.cpp:253
     // Finish initializing the ELF header.
-    initELFHeader<ELFT>(ElfHeader, Stub.Arch);
+    initELFHeader<ELFT>(ElfHeader, (uint16_t)(Stub.Target.Arch.getValue()));
     ElfHeader.e_shstrndx = ShStrTab.Index;
----------------
This should be a C++ cast, probably a `static_cast`.


================
Comment at: llvm/lib/InterfaceStub/TBEHandler.cpp:61
+    if (Value == ELFEndiannessType::Unknown) {
+      return "Unsupported endianness";
+    }
----------------
Does this trigger an error? If not we should maybe consider using an assertion.


================
Comment at: llvm/lib/InterfaceStub/TBEHandler.cpp:90
+    if (Value == ELFBitWidthType::Unknown) {
+      return "Unsupported bit width";
+    }
----------------
Ditto here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99399



More information about the llvm-commits mailing list