From 1caabbef8e8e73b3dd0cf1f15cf7417d75b7621c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 4 Nov 2021 19:26:25 -0700 Subject: [OpaquePtr] Fix initialization-order-fiasco Asan detects it after D112732. --- llvm/lib/IR/LLVMContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/IR/LLVMContext.cpp') diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index dce5d17..90716d9 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/lib/IR/LLVMContext.cpp @@ -351,9 +351,9 @@ std::unique_ptr LLVMContext::getDiagnosticHandler() { void LLVMContext::enableOpaquePointers() const { assert(pImpl->PointerTypes.empty() && pImpl->ASPointerTypes.empty() && "Must be called before creating any pointer types"); - pImpl->OpaquePointers = true; + pImpl->setOpaquePointers(true); } bool LLVMContext::supportsTypedPointers() const { - return !pImpl->OpaquePointers; + return !pImpl->getOpaquePointers(); } -- cgit v1.1