Skip to content

Commit

Permalink
[Autobackout][FunctionalRegression]Revert of change: 7aab427: Reduce …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
sys-igc authored and igcbot committed Nov 14, 2024
1 parent 2e8c554 commit a6949d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions IGC/WrapperLLVM/include/llvmWrapper/IR/IRBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,14 @@ namespace IGCLLVM

#if LLVM_VERSION_MAJOR >= 13

// This wrapper function is deprecated because it uses typed pointer and
// should no longer be used in LLVM 14+ compatible code.
inline llvm::LoadInst* CreateLoad(llvm::Value* Ptr, const char *Name)
{
llvm::Type* ptrType = IGCLLVM::getNonOpaquePtrEltTy(Ptr->getType());
return llvm::IRBuilder<T, InserterTyDef()>::CreateLoad(ptrType, Ptr, Name);
}

// This wrapper function is deprecated because it uses typed pointer and
// should no longer be used in LLVM 14+ compatible code.
inline llvm::LoadInst* CreateLoad(llvm::Value* Ptr, const llvm::Twine &Name = "")
Expand Down

0 comments on commit a6949d8

Please sign in to comment.