diff options
author | Nikita Popov <npopov@redhat.com> | 2022-05-31 11:58:35 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-06-02 09:40:56 +0200 |
commit | 41d5033eb162cb92b684855166cabfa3983b74c6 (patch) | |
tree | 96632c32feb2ba0d3fefe05c6ad53fff1948e202 /llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp | |
parent | 6333e5dde9872ae56d7979432a76f83cf7ac6820 (diff) | |
download | llvm-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/unittests/Frontend/OpenMPIRBuilderTest.cpp')
-rw-r--r-- | llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp index 331f6a0..9abce44 100644 --- a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp +++ b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp @@ -158,6 +158,7 @@ static omp::ScheduleKind getSchedKind(omp::OMPScheduleType SchedType) { class OpenMPIRBuilderTest : public testing::Test { protected: void SetUp() override { + Ctx.setOpaquePointers(false); // TODO: Update tests for opaque pointers. M.reset(new Module("MyModule", Ctx)); FunctionType *FTy = FunctionType::get(Type::getVoidTy(Ctx), {Type::getInt32Ty(Ctx)}, |