From ea5abf14530634d05b9d1dc6d5d7d5f7934f0ea3 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 6 Jan 2020 16:15:17 +0000 Subject: [PATCH] Fix "use of uninitialized variable" static analyzer warning. NFCI. --- llvm/lib/CodeGen/LiveDebugVariables.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index 254503c..2cc547a 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -506,7 +506,7 @@ static void printExtendedName(raw_ostream &OS, const DINode *Node, const DILocation *DL) { const LLVMContext &Ctx = Node->getContext(); StringRef Res; - unsigned Line; + unsigned Line = 0; if (const auto *V = dyn_cast(Node)) { Res = V->getName(); Line = V->getLine(); -- 2.7.4