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/unittests/IR/InstructionsTest.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/unittests/IR/InstructionsTest.cpp')
-rw-r--r-- | llvm/unittests/IR/InstructionsTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/unittests/IR/InstructionsTest.cpp b/llvm/unittests/IR/InstructionsTest.cpp index b43a8c0..637c692 100644 --- a/llvm/unittests/IR/InstructionsTest.cpp +++ b/llvm/unittests/IR/InstructionsTest.cpp @@ -635,7 +635,7 @@ TEST(InstructionsTest, isEliminableCastPair) { Type* Int16Ty = Type::getInt16Ty(C); Type* Int32Ty = Type::getInt32Ty(C); Type* Int64Ty = Type::getInt64Ty(C); - Type* Int64PtrTy = Type::getInt64PtrTy(C); + Type *Int64PtrTy = PointerType::get(C, 0); // Source and destination pointers have same size -> bitcast. EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::PtrToInt, @@ -680,8 +680,8 @@ TEST(InstructionsTest, isEliminableCastPair) { "-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64" "-v128:128:128-a:0:64-s:64:64-f80:128:128-n8:16:32:64-S128"); - Type* Int64PtrTyAS1 = Type::getInt64PtrTy(C, 1); - Type* Int64PtrTyAS2 = Type::getInt64PtrTy(C, 2); + Type *Int64PtrTyAS1 = PointerType::get(C, 1); + Type *Int64PtrTyAS2 = PointerType::get(C, 2); IntegerType *Int16SizePtr = DL.getIntPtrType(C, 1); IntegerType *Int64SizePtr = DL.getIntPtrType(C, 2); |