[PATCH] D158102: APFloat: Add getExactLog2Abs

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 04:22:21 PDT 2023


sepavloff added inline comments.


================
Comment at: llvm/include/llvm/ADT/APFloat.h:494-495
+  // sign bit. If it's not an exact power of 2, return INT_MIN
+  LLVM_READONLY
+  int getExactLog2Abs() const;
+
----------------
It looks like using `std::optional<int>` as return value can produce clearer interface, no?


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

https://reviews.llvm.org/D158102



More information about the llvm-commits mailing list