[llvm] [NFCI][IR] Add optional DataLayout argument to zero and null value related APIs (PR #183208)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat May 2 09:38:57 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;
----------------
nikic wrote:
Why does isNullValue() need the DataLayout argument as well? Wouldn't that always be represented by ConstantPointerNull?
https://github.com/llvm/llvm-project/pull/183208
More information about the llvm-commits
mailing list