Skip to content

Commit a6949d8

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: 7aab427: Reduce usage of pointer element types (31).
This change replaces calls to getNonOpaquePtrEltTy with element type information got through other means. This change is part of the effort to support opaque pointers in newer LLVM versions.
1 parent 2e8c554 commit a6949d8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

IGC/WrapperLLVM/include/llvmWrapper/IR/IRBuilder.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,14 @@ namespace IGCLLVM
215215

216216
#if LLVM_VERSION_MAJOR >= 13
217217

218+
// This wrapper function is deprecated because it uses typed pointer and
219+
// should no longer be used in LLVM 14+ compatible code.
220+
inline llvm::LoadInst* CreateLoad(llvm::Value* Ptr, const char *Name)
221+
{
222+
llvm::Type* ptrType = IGCLLVM::getNonOpaquePtrEltTy(Ptr->getType());
223+
return llvm::IRBuilder<T, InserterTyDef()>::CreateLoad(ptrType, Ptr, Name);
224+
}
225+
218226
// This wrapper function is deprecated because it uses typed pointer and
219227
// should no longer be used in LLVM 14+ compatible code.
220228
inline llvm::LoadInst* CreateLoad(llvm::Value* Ptr, const llvm::Twine &Name = "")

0 commit comments

Comments
 (0)