diff --git a/llvm/tools/lto/lto.cpp b/llvm/tools/lto/lto.cpp index a2d051257ea4c..f50b6ac5ae3dc 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);