[all-commits] [llvm/llvm-project] 2ce499: [NFCI][IR] Add DataLayout pointer to zero and null...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Sat May 2 08:19:01 PDT 2026
Branch: refs/heads/users/shiltian/constant-zero-value-apis
Home: https://github.com/llvm/llvm-project
Commit: 2ce499bac234348d538b7dba13458fa1d475f867
https://github.com/llvm/llvm-project/commit/2ce499bac234348d538b7dba13458fa1d475f867
Author: Shilei Tian <i at tianshilei.me>
Date: 2026-05-02 (Sat, 02 May 2026)
Changed paths:
M llvm/include/llvm/IR/Constant.h
M llvm/lib/IR/Constants.cpp
M llvm/unittests/IR/ConstantsTest.cpp
Log Message:
-----------
[NFCI][IR] Add DataLayout pointer to zero and null value related APIs
When the semantics of `ConstantPointerNull` change to represent a semantic null
pointer in the future, a null value won't necessarily be a zero value anymore.
Because of that, the entire LLVM constant infrastructure will need to change. As
a first step, this PR adds an optional data layout pointer to `isNullValue`,
`isZeroValue`, `getNullValue`, and `getZeroValue`. It isn't used yet, since a
null value is still a zero value right now.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list