-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable LLVM 15 buildability by wrapping
getPointerElementType()
Direct usage is deprecated in llvm/llvm-project@c99424f76 as part of the opaque pointer switch.
- Loading branch information
1 parent
8caafe9
commit 2e33cca
Showing
6 changed files
with
57 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
Copyright (C) 2022 Intel Corporation | ||
SPDX-License-Identifier: MIT | ||
============================= end_copyright_notice ===========================*/ | ||
|
||
#ifndef VCINTR_IR_TYPE_H | ||
#define VCINTR_IR_TYPE_H | ||
|
||
#include <llvm/IR/Type.h> | ||
|
||
namespace VCINTR { | ||
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 | ||
return PTy->getNonOpaquePointerElementType(); | ||
#endif // VC_INTR_LLVM_VERSION_MAJOR < 14 | ||
} | ||
|
||
} // namespace Type | ||
} // namespace VCINTR | ||
|
||
#endif // VCINTR_IR_TYPE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters