Skip to content

Commit

Permalink
Assume getNonOpaquePointerElementType is unreachable after LLVM 17
Browse files Browse the repository at this point in the history
  • Loading branch information
frasercrmck committed Mar 21, 2024
1 parent 55b4dd5 commit ec40c32
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions GenXIntrinsics/include/llvmVCWrapper/IR/Type.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ namespace Type {
inline llvm::Type *getNonOpaquePtrEltTy(const llvm::Type *PTy) {
#if VC_INTR_LLVM_VERSION_MAJOR < 14
return PTy->getPointerElementType();
#else // VC_INTR_LLVM_VERSION_MAJOR < 14
#elif VC_INTR_LLVM_VERSION_MAJOR < 17
return PTy->getNonOpaquePointerElementType();
#endif // VC_INTR_LLVM_VERSION_MAJOR < 14
#else
llvm_unreachable("Pointers no longer have element types");
#endif // VC_INTR_LLVM_VERSION_MAJOR < 17
}

} // namespace Type
Expand Down

0 comments on commit ec40c32

Please sign in to comment.