[PATCH] D81585: [AIX][XCOFF][Patch1] Provide decoding trace back table information API for xcoff object file for llvm-objdump -d

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 20 21:16:39 PDT 2020


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/include/llvm/Object/XCOFFObjectFile.h:443
+
+  bool isBackChainStored() const;
+  uint8_t getNumOfFPRsSaved() const;
----------------
There's no query corresponding to `IsFixupMask`?


================
Comment at: llvm/lib/Object/XCOFFObjectFile.cpp:911
+    if (!Err && NumOfCtlAnchors) {
+      SmallVector<uint32_t, 8> Disp;
+      for (uint32_t I = 0; I < NumOfCtlAnchors && !Err; I++)
----------------
This should reserve the number of entries beforehand (since that number is known).


================
Comment at: llvm/lib/Object/XCOFFObjectFile.cpp:912
+      SmallVector<uint32_t, 8> Disp;
+      for (uint32_t I = 0; I < NumOfCtlAnchors && !Err; I++)
+        Disp.push_back(DE.getU32(&Offset, &Err));
----------------
Minor nit: Let's be consistent in using `++I`.


================
Comment at: llvm/lib/Object/XCOFFObjectFile.cpp:914
+        Disp.push_back(DE.getU32(&Offset, &Err));
+      ControlledStorageInfoDisp = Disp;
+    }
----------------
Please use `std::move`.


================
Comment at: llvm/lib/Object/XCOFFObjectFile.cpp:927
+
+  // TODO: Need to parse vector Info and extension table if there is.
+
----------------
Minor nit: s/Info/info/;


================
Comment at: llvm/lib/Object/XCOFFObjectFile.cpp:974
+
+bool XCOFFTracebackTable::IsFloatingPointOperationLogOrAbortEnabled() const {
+  return GETBITWITHMASK(0, IsFloatingPointOperationLogOrAbortEnabledMask);
----------------
The capitalization of this function name does not match that of the other functions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81585





More information about the llvm-commits mailing list