[llvm] 9772570 - Fix uninitialized variable warning. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 2 07:46:02 PDT 2019
Author: Simon Pilgrim
Date: 2019-11-02T14:42:38Z
New Revision: 97725707f488d3f00f94d4c4f2d9e193c302b23c
URL: https://github.com/llvm/llvm-project/commit/97725707f488d3f00f94d4c4f2d9e193c302b23c
DIFF: https://github.com/llvm/llvm-project/commit/97725707f488d3f00f94d4c4f2d9e193c302b23c.diff
LOG: Fix uninitialized variable warning. NFCI.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 0c30ea0108cb..1b02f96cf279 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -9256,7 +9256,7 @@ bool SelectionDAG::areNonVolatileConsecutiveLoads(LoadSDNode *LD,
/// it cannot be inferred.
unsigned SelectionDAG::InferPtrAlignment(SDValue Ptr) const {
// If this is a GlobalAddress + cst, return the alignment.
- const GlobalValue *GV;
+ const GlobalValue *GV = nullptr;
int64_t GVOffset = 0;
if (TLI->isGAPlusOffset(Ptr.getNode(), GV, GVOffset)) {
unsigned IdxWidth = getDataLayout().getIndexTypeSizeInBits(GV->getType());
More information about the llvm-commits
mailing list