Skip to content

Commit

Permalink
Removed deprecated API usage since LLVM 18
Browse files Browse the repository at this point in the history
This can be done safely because the used APIs are always return ture (since LLVM 18).
  • Loading branch information
XinWang10 authored and sys-cmllvm committed Dec 12, 2023
1 parent b16218b commit 93726c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions GenXIntrinsics/lib/GenXIntrinsics/AdaptorsCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ void legalizeParamAttributes(Function *F) {
continue;

#if VC_INTR_LLVM_VERSION_MAJOR >= 13
#if VC_INTR_LLVM_VERSION_MAJOR < 18
if (PTy->isOpaque())
#endif // VC_INTR_LLVM_VERSION_MAJOR < 18
continue;
#endif // VC_INTR_LLVM_VERSION_MAJOR >= 13

Expand Down
2 changes: 2 additions & 0 deletions GenXIntrinsics/lib/GenXIntrinsics/GenXIntrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,9 @@ static std::string getMangledTypeStr(Type *Ty) {
if (PointerType *PTyp = dyn_cast<PointerType>(Ty)) {
Result += "p" + llvm::utostr(PTyp->getAddressSpace());
#if VC_INTR_LLVM_VERSION_MAJOR >= 13
#if VC_INTR_LLVM_VERSION_MAJOR < 18
if (PTyp->isOpaque())
#endif // VC_INTR_LLVM_VERSION_MAJOR < 18
return Result;
#endif // VC_INTR_LLVM_VERSION_MAJOR >= 13
Result += getMangledTypeStr(VCINTR::Type::getNonOpaquePtrEltTy(PTyp));
Expand Down

0 comments on commit 93726c2

Please sign in to comment.