[PATCH] D92398: [AIX][XCOFF] emit traceback table for function in aix

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 17:07:18 PST 2020


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/lib/BinaryFormat/XCOFF.cpp:113
+  bool Begin = false;
+  while (I < ParmsNum || Value) {
+    if (Begin)
----------------
Minor nit: avoid implicit conversion to bool when comparing against zero for integers.


================
Comment at: llvm/lib/BinaryFormat/XCOFF.cpp:136
+    default:
+      assert(false && "Unrecognized bits in ParmsType.");
+    }
----------------
Is `assert` right for all expected callers of this function? This seems to be a reusable implementation where the error handling policy should be left to the caller.


================
Comment at: llvm/lib/BinaryFormat/XCOFF.cpp:138
+    }
+    Value <<= 2;
+  }
----------------
Why is this hardcoded (as opposed to a named constant representing the width of the `ParmTypeMask`)?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92398



More information about the llvm-commits mailing list