aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Frontend/OpenMPIRBuilderTest.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/unittests/Frontend/OpenMPIRBuilderTest.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/unittests/Frontend/OpenMPIRBuilderTest.cpp')
-rw-r--r--llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp1
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)},