[PATCH] D139683: [APInt] provide a safe API for zext value and sext value.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 00:08:54 PST 2022


RKSimon added inline comments.


================
Comment at: llvm/include/llvm/ADT/APInt.h:1499
+  /// uint64_t. Otherwise no value is returned.
+  Optional<uint64_t> tryZExtValue() const;
+
----------------
std::optional ?


================
Comment at: llvm/lib/Support/APInt.cpp:514
+                                 : Optional<int64_t>();
+}
+
----------------
inline?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139683



More information about the llvm-commits mailing list