aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/LLVMContextImpl.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-05-31 11:58:35 +0200
committerNikita Popov <npopov@redhat.com>2022-06-02 09:40:56 +0200
commit41d5033eb162cb92b684855166cabfa3983b74c6 (patch)
tree96632c32feb2ba0d3fefe05c6ad53fff1948e202 /llvm/lib/IR/LLVMContextImpl.cpp
parent6333e5dde9872ae56d7979432a76f83cf7ac6820 (diff)
downloadllvm-41d5033eb162cb92b684855166cabfa3983b74c6.zip
llvm-41d5033eb162cb92b684855166cabfa3983b74c6.tar.gz
llvm-41d5033eb162cb92b684855166cabfa3983b74c6.tar.bz2
[IR] Enable opaque pointers by default
This enabled opaque pointers by default in LLVM. The effect of this is twofold: * If IR that contains *neither* explicit ptr nor %T* types is passed to tools, we will now use opaque pointer mode, unless -opaque-pointers=0 has been explicitly passed. * Users of LLVM as a library will now default to opaque pointers. It is possible to opt-out by calling setOpaquePointers(false) on LLVMContext. A cmake option to toggle this default will not be provided. Frontends or other tools that want to (temporarily) keep using typed pointers should disable opaque pointers via LLVMContext. Differential Revision: https://reviews.llvm.org/D126689
Diffstat (limited to 'llvm/lib/IR/LLVMContextImpl.cpp')
-rw-r--r--llvm/lib/IR/LLVMContextImpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.cpp b/llvm/lib/IR/LLVMContextImpl.cpp
index ed19227..dc44a34 100644
--- a/llvm/lib/IR/LLVMContextImpl.cpp
+++ b/llvm/lib/IR/LLVMContextImpl.cpp
@@ -36,7 +36,7 @@ using namespace llvm;
static cl::opt<bool>
OpaquePointersCL("opaque-pointers", cl::desc("Use opaque pointers"),
- cl::init(false));
+ cl::init(true));
LLVMContextImpl::LLVMContextImpl(LLVMContext &C)
: DiagHandler(std::make_unique<DiagnosticHandler>()),