r302854 - Fix uninitialized bool read causing x86_64-mno-sse.c test failure

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Thu May 11 17:10:49 PDT 2017


Author: rnk
Date: Thu May 11 19:10:49 2017
New Revision: 302854

URL: http://llvm.org/viewvc/llvm-project?rev=302854&view=rev
Log:
Fix uninitialized bool read causing x86_64-mno-sse.c test failure

Modified:
    cfe/trunk/lib/CodeGen/CodeGenAction.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenAction.cpp?rev=302854&r1=302853&r2=302854&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenAction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenAction.cpp Thu May 11 19:10:49 2017
@@ -548,9 +548,9 @@ void BackendConsumer::UnsupportedDiagHan
 
   StringRef Filename;
   unsigned Line, Column;
-  bool BadDebugInfo;
-  FullSourceLoc Loc = getBestLocationFromDebugLoc(D, BadDebugInfo, Filename,
-      Line, Column);
+  bool BadDebugInfo = false;
+  FullSourceLoc Loc =
+      getBestLocationFromDebugLoc(D, BadDebugInfo, Filename, Line, Column);
 
   Diags.Report(Loc, diag::err_fe_backend_unsupported) << D.getMessage().str();
 
@@ -572,8 +572,8 @@ void BackendConsumer::EmitOptimizationMe
   StringRef Filename;
   unsigned Line, Column;
   bool BadDebugInfo = false;
-  FullSourceLoc Loc = getBestLocationFromDebugLoc(D, BadDebugInfo, Filename,
-      Line, Column);
+  FullSourceLoc Loc =
+      getBestLocationFromDebugLoc(D, BadDebugInfo, Filename, Line, Column);
 
   std::string Msg;
   raw_string_ostream MsgStream(Msg);




More information about the cfe-commits mailing list