[llvm] cde6003 - [LLVMContext] Respect default value of -opaque-pointers option (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 23 04:59:50 PDT 2022


Author: Nikita Popov
Date: 2022-03-23T12:59:42+01:00
New Revision: cde6003ae07195f6d62c73eb98c585af6693e6bb

URL: https://github.com/llvm/llvm-project/commit/cde6003ae07195f6d62c73eb98c585af6693e6bb
DIFF: https://github.com/llvm/llvm-project/commit/cde6003ae07195f6d62c73eb98c585af6693e6bb.diff

LOG: [LLVMContext] Respect default value of -opaque-pointers option (NFC)

If the option is edited to use true as the default, we should
respect that, rather than hardcoding false here.

Added: 
    

Modified: 
    llvm/lib/IR/LLVMContextImpl.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/LLVMContextImpl.cpp b/llvm/lib/IR/LLVMContextImpl.cpp
index 401af7a4dfcae..1d115e50021b2 100644
--- a/llvm/lib/IR/LLVMContextImpl.cpp
+++ b/llvm/lib/IR/LLVMContextImpl.cpp
@@ -255,7 +255,7 @@ bool LLVMContextImpl::hasOpaquePointersValue() {
 
 bool LLVMContextImpl::getOpaquePointers() {
   if (LLVM_UNLIKELY(!(OpaquePointers.hasValue())))
-    OpaquePointers = false;
+    OpaquePointers = OpaquePointersCL;
   return *OpaquePointers;
 }
 


        


More information about the llvm-commits mailing list