Correctly initialize LineSectionSymbol. Thanks to Duncan Sands for noticing it.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 3 Mar 2012 14:24:15 +0000 (14:24 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 3 Mar 2012 14:24:15 +0000 (14:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151979 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCAsmStreamer.cpp
lib/MC/MCObjectStreamer.cpp

index 742d15d9e7e38c341c1024ea6ebca2fbc8b38da0..11f0f729633702c66be5cf832fe2050b3221cc87 100644 (file)
@@ -1311,7 +1311,7 @@ void MCAsmStreamer::EmitRawText(StringRef String) {
 void MCAsmStreamer::FinishImpl() {
   // FIXME: This header is duplicated with MCObjectStreamer
   // Dump out the dwarf file & directory tables and line tables.
-  const MCSymbol *LineSectionSymbol;
+  const MCSymbol *LineSectionSymbol = NULL;
   if (getContext().hasDwarfFiles() && !UseLoc)
     LineSectionSymbol = MCDwarfFileTable::Emit(this);
 
index a7eb8b03a2c94ec94d3d117493cd791008a727b5..906bdc3ab8c8c6a9d6e903bf2dfa4474e152a371 100644 (file)
@@ -266,7 +266,7 @@ void MCObjectStreamer::EmitGPRel32Value(const MCExpr *Value) {
 
 void MCObjectStreamer::FinishImpl() {
   // Dump out the dwarf file & directory tables and line tables.
-  const MCSymbol *LineSectionSymbol;
+  const MCSymbol *LineSectionSymbol = NULL;
   if (getContext().hasDwarfFiles())
     LineSectionSymbol = MCDwarfFileTable::Emit(this);