[llvm] [NFCI][IR] Add optional DataLayout argument to zero and null value related APIs (PR #183208)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Sat May 2 09:50:58 PDT 2026


================
@@ -52,7 +53,10 @@ class Constant : public User {
   Constant(const Constant &) = delete;
 
   /// Return true if this is the value that would be returned by getNullValue.
-  LLVM_ABI bool isNullValue() const;
+  LLVM_ABI bool isNullValue(const DataLayout *DL = nullptr) const;
----------------
shiltian wrote:

are you suggesting that we don't actually need to check recursively?

https://github.com/llvm/llvm-project/pull/183208


More information about the llvm-commits mailing list