From 3a5426f5724350bfbd970fe85ef0d0e45b50b2ee Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Mon, 19 Dec 2022 16:02:18 -0800 Subject: [PATCH] Revert "LTO: always parse modules in opaque pointer mode." This reverts commit 8ba9a5218782fa4f94b5c516d513a4259992c254. --- llvm/tools/lto/lto.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/llvm/tools/lto/lto.cpp b/llvm/tools/lto/lto.cpp index a2d0512..f50b6ac 100644 --- a/llvm/tools/lto/lto.cpp +++ b/llvm/tools/lto/lto.cpp @@ -106,7 +106,6 @@ static void lto_initialize() { static LLVMContext Context; LTOContext = &Context; - LTOContext->setOpaquePointers(true); LTOContext->setDiagnosticHandler( std::make_unique(), true); initialized = true; @@ -134,10 +133,7 @@ struct LibLTOCodeGenerator : LTOCodeGenerator { // Module must be destructed before its context gets destructed. ~LibLTOCodeGenerator() { resetMergedModule(); } - void init() { - OwnedContext->setOpaquePointers(true); - setDiagnosticHandler(handleLibLTODiagnostic, nullptr); - } + void init() { setDiagnosticHandler(handleLibLTODiagnostic, nullptr); } std::unique_ptr NativeObjectFile; std::unique_ptr OwnedContext; @@ -275,7 +271,6 @@ lto_module_t lto_module_create_in_local_context(const void *mem, size_t length, // Create a local context. Ownership will be transferred to LTOModule. std::unique_ptr Context = std::make_unique(); - Context->setOpaquePointers(true); Context->setDiagnosticHandler(std::make_unique(), true); -- 2.7.4