[llvm] c90f15d - [NFC] Fix unused var in release build

Jordan Rupprecht via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 13:09:02 PDT 2020


Author: Jordan Rupprecht
Date: 2020-09-01T13:05:56-07:00
New Revision: c90f15d25a176d7990f3a10b917caf0999a85b0d

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

LOG: [NFC] Fix unused var in release build

Added: 
    

Modified: 
    llvm/lib/Analysis/Loads.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/Loads.cpp b/llvm/lib/Analysis/Loads.cpp
index b81322b69bbd..d63f6b9b1964 100644
--- a/llvm/lib/Analysis/Loads.cpp
+++ b/llvm/lib/Analysis/Loads.cpp
@@ -516,7 +516,7 @@ bool llvm::canReplacePointersIfEqual(Value *A, Value *B, const DataLayout &DL,
   if (auto *C = dyn_cast<Constant>(B)) {
     // Do not allow replacing a pointer with a constant pointer, unless it is
     // either null or at least one byte is dereferenceable.
-    APInt OneByte(DL.getPointerTypeSizeInBits(A->getType()), 1);
+    APInt OneByte(DL.getPointerTypeSizeInBits(Ty), 1);
     return C->isNullValue() ||
            isDereferenceableAndAlignedPointer(B, Align(1), OneByte, DL, CtxI);
   }


        


More information about the llvm-commits mailing list