[llvm] Remove calls to setOpaquePointers() (NFC)
authorNikita Popov <npopov@redhat.com>
Fri, 14 Jul 2023 07:31:55 +0000 (09:31 +0200)
committerNikita Popov <npopov@redhat.com>
Fri, 14 Jul 2023 07:31:55 +0000 (09:31 +0200)
True is the default (and only possible) value.

llvm/tools/llvm-nm/llvm-nm.cpp
llvm/unittests/Analysis/BasicAliasAnalysisTest.cpp
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp

index 473f5fd..1f6a5d1 100644 (file)
@@ -2267,11 +2267,7 @@ static std::vector<NMSymbol> dumpSymbolNamesFromFile(StringRef Filename) {
   if (error(BufferOrErr.getError(), Filename))
     return SymbolList;
 
-  // Always enable opaque pointers, to handle archives with mixed typed and
-  // opaque pointer bitcode files gracefully. As we're only reading symbols,
-  // the used pointer types don't matter.
   LLVMContext Context;
-  Context.setOpaquePointers(true);
   LLVMContext *ContextPtr = NoLLVMBitcode ? nullptr : &Context;
   Expected<std::unique_ptr<Binary>> BinaryOrErr =
       createBinary(BufferOrErr.get()->getMemBufferRef(), ContextPtr);
index a84d65e..8f0feb6 100644 (file)
@@ -66,9 +66,7 @@ protected:
 
 public:
   BasicAATest()
-      : M("BasicAATest", C), B(C), DL(DLString), TLI(TLII), F(nullptr) {
-    C.setOpaquePointers(true);
-  }
+      : M("BasicAATest", C), B(C), DL(DLString), TLI(TLII), F(nullptr) {}
 };
 
 // Check that a function arg can't trivially alias a global when we're accessing
index 253f061..dd1c958 100644 (file)
@@ -162,7 +162,6 @@ static omp::ScheduleKind getSchedKind(omp::OMPScheduleType SchedType) {
 class OpenMPIRBuilderTest : public testing::Test {
 protected:
   void SetUp() override {
-    Ctx.setOpaquePointers(true);
     M.reset(new Module("MyModule", Ctx));
     FunctionType *FTy =
         FunctionType::get(Type::getVoidTy(Ctx), {Type::getInt32Ty(Ctx)},