[llvm] 8e55e33 - [llvm] Remove calls to setOpaquePointers() (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 14 00:38:08 PDT 2023
Author: Nikita Popov
Date: 2023-07-14T09:31:55+02:00
New Revision: 8e55e3374980ba64e059b8b55483c41c548f00a7
URL: https://github.com/llvm/llvm-project/commit/8e55e3374980ba64e059b8b55483c41c548f00a7
DIFF: https://github.com/llvm/llvm-project/commit/8e55e3374980ba64e059b8b55483c41c548f00a7.diff
LOG: [llvm] Remove calls to setOpaquePointers() (NFC)
True is the default (and only possible) value.
Added:
Modified:
llvm/tools/llvm-nm/llvm-nm.cpp
llvm/unittests/Analysis/BasicAliasAnalysisTest.cpp
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-nm/llvm-nm.cpp b/llvm/tools/llvm-nm/llvm-nm.cpp
index 473f5fd32aa8f7..1f6a5d1ab806eb 100644
--- a/llvm/tools/llvm-nm/llvm-nm.cpp
+++ b/llvm/tools/llvm-nm/llvm-nm.cpp
@@ -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);
diff --git a/llvm/unittests/Analysis/BasicAliasAnalysisTest.cpp b/llvm/unittests/Analysis/BasicAliasAnalysisTest.cpp
index a84d65eb781af9..8f0feb6e4797e2 100644
--- a/llvm/unittests/Analysis/BasicAliasAnalysisTest.cpp
+++ b/llvm/unittests/Analysis/BasicAliasAnalysisTest.cpp
@@ -66,9 +66,7 @@ class BasicAATest : public testing::Test {
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
diff --git a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
index 253f0612c7b910..dd1c958cff8a70 100644
--- a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+++ b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
@@ -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)},
More information about the llvm-commits
mailing list