haowei marked an inline comment as done.
haowei added inline comments.

================
Comment at: llvm/include/llvm/InterfaceStub/ELFObjHandler.h:25
 
 namespace elfabi {
 
----------------
phosek wrote:
> Shouldn't this be in namespace `ifs`?
This was renamed to ifs in D100139.  Rename it here will need some changes in 
elfabi code, which is unnecessary (and will be deleted in D100139)


================
Comment at: llvm/lib/InterfaceStub/IFSStub.cpp:65
+uint8_t elfabi::convertIFSBitWidthToELF(IFSBitWidthType BitWidth) {
+  return BitWidth == IFSBitWidthType::IFS32 ? ELF::ELFCLASS32 : 
ELF::ELFCLASS64;
+}
----------------
phosek wrote:
> I'd consider using `switch` here so if someone adds a new entry to the 
> `IFSBitWidthType` enum, it gets caught by the compiler.
I changed it to switch and I added `llvm_unreachable("unkown bitwidth");` to 
cases where an unknown bitwidth or endianness is used. Please let me know if it 
is OK to do so.

The Unknown enum is reserved for ifs file that has unknown bitwidth or 
endianness field and will trigger ifs tool's early termination. So it shouldn't 
be seen when IFS library is writing an ELF file.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99810

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to