Fix "use of uninitialized variable" static analyzer warning. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 6 Jan 2020 16:15:17 +0000 (16:15 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 6 Jan 2020 16:36:56 +0000 (16:36 +0000)
llvm/lib/CodeGen/LiveDebugVariables.cpp

index 254503c..2cc547a 100644 (file)
@@ -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<const DILocalVariable>(Node)) {
     Res = V->getName();
     Line = V->getLine();