aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/LLVMContext.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-06-29 23:30:27 +0200
committerNikita Popov <nikita.ppv@gmail.com>2021-07-01 18:26:41 +0200
commit8c7349b3f43267036f6c133d3502def86307528a (patch)
treebb412cc198410295d68844dda46a5cafd4bfbf0a /llvm/lib/IR/LLVMContext.cpp
parent99c7e918b5ea2262635cc5f80b8887e487227638 (diff)
downloadllvm-8c7349b3f43267036f6c133d3502def86307528a.zip
llvm-8c7349b3f43267036f6c133d3502def86307528a.tar.gz
llvm-8c7349b3f43267036f6c133d3502def86307528a.tar.bz2
[OpaquePtr] Support opaque pointers in intrinsic type check
This adds support for opaque pointers in intrinsic type checks of IIT kind Pointer and PtrToElt. This is less straight-forward than it might initially seem, because we should only accept opaque pointers here in --force-opaque-pointers mode. Otherwise, there would be more than one valid type signature for a given intrinsic name. Differential Revision: https://reviews.llvm.org/D105155
Diffstat (limited to 'llvm/lib/IR/LLVMContext.cpp')
-rw-r--r--llvm/lib/IR/LLVMContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp
index 79002fb..234806b 100644
--- a/llvm/lib/IR/LLVMContext.cpp
+++ b/llvm/lib/IR/LLVMContext.cpp
@@ -347,3 +347,7 @@ const DiagnosticHandler *LLVMContext::getDiagHandlerPtr() const {
std::unique_ptr<DiagnosticHandler> LLVMContext::getDiagnosticHandler() {
return std::move(pImpl->DiagHandler);
}
+
+bool LLVMContext::supportsTypedPointers() const {
+ return !pImpl->ForceOpaquePointers;
+}