diff options
author | Vitaly Buka <vitalybuka@google.com> | 2021-11-04 19:26:25 -0700 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2021-11-04 19:29:06 -0700 |
commit | 1caabbef8e8e73b3dd0cf1f15cf7417d75b7621c (patch) | |
tree | 0488211c845ed7383c5adb7f88234ea47a197d9b /llvm/lib/IR/LLVMContext.cpp | |
parent | 3f6c0fb2ff750c9246aee41eb8ad086518752edf (diff) | |
download | llvm-1caabbef8e8e73b3dd0cf1f15cf7417d75b7621c.zip llvm-1caabbef8e8e73b3dd0cf1f15cf7417d75b7621c.tar.gz llvm-1caabbef8e8e73b3dd0cf1f15cf7417d75b7621c.tar.bz2 |
[OpaquePtr] Fix initialization-order-fiasco
Asan detects it after D112732.
Diffstat (limited to 'llvm/lib/IR/LLVMContext.cpp')
-rw-r--r-- | llvm/lib/IR/LLVMContext.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<DiagnosticHandler> 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(); } |