diff options
author | Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> | 2023-07-31 16:32:44 +0200 |
---|---|---|
committer | Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> | 2023-08-02 12:08:37 +0200 |
commit | fd05c34b18fbc3f37494bef9118c368f0c11595a (patch) | |
tree | 97a28f8b1c4742e1bc5f775e374763edab2446a2 /llvm/lib/IR/Function.cpp | |
parent | f40af3b351a9f282edd414d2ebf20a9fcd74d8f1 (diff) | |
download | llvm-fd05c34b18fbc3f37494bef9118c368f0c11595a.zip llvm-fd05c34b18fbc3f37494bef9118c368f0c11595a.tar.gz llvm-fd05c34b18fbc3f37494bef9118c368f0c11595a.tar.bz2 |
Stop using legacy helpers indicating typed pointer types. NFC
Since we no longer support typed LLVM IR pointer types, the code can
be simplified into for example using PointerType::get directly instead
of using Type::getInt8PtrTy and Type::getInt32PtrTy etc.
Differential Revision: https://reviews.llvm.org/D156733
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r-- | llvm/lib/IR/Function.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index 27219e8..c01a27b 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -1878,7 +1878,7 @@ void Function::allocHungoffUselist() { setNumHungOffUseOperands(3); // Initialize the uselist with placeholder operands to allow traversal. - auto *CPN = ConstantPointerNull::get(Type::getInt1PtrTy(getContext(), 0)); + auto *CPN = ConstantPointerNull::get(PointerType::get(getContext(), 0)); Op<0>().set(CPN); Op<1>().set(CPN); Op<2>().set(CPN); @@ -1890,8 +1890,7 @@ void Function::setHungoffOperand(Constant *C) { allocHungoffUselist(); Op<Idx>().set(C); } else if (getNumOperands()) { - Op<Idx>().set( - ConstantPointerNull::get(Type::getInt1PtrTy(getContext(), 0))); + Op<Idx>().set(ConstantPointerNull::get(PointerType::get(getContext(), 0))); } } |