MCDwarf: Initialize MCLineTableHeader::Label
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 14 Mar 2014 20:36:44 +0000 (20:36 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 14 Mar 2014 20:36:44 +0000 (20:36 +0000)
This sometimes remains null into MCLineTableHeader::Emit where we
conditionally construct a label if one isn't provided for us. We need it
to remain null (rather than just always constructing the label) so we
can identify unused line tables... which is a bit weird and maybe we can
do away with that logic one day (& on that day we can always construct
the label up-front and just have compilation units query the line table
for its label, etc)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203967 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCDwarf.h

index 2a878c5b1b2ee1833594d0e6a8d20a0f4e1ea87e..abd2f7a2d6919a16dab1933f4bee6157e97e58d6 100644 (file)
@@ -179,6 +179,7 @@ struct MCDwarfLineTableHeader {
   MCSymbol *Label;
   SmallVector<std::string, 3> MCDwarfDirs;
   SmallVector<MCDwarfFile, 3> MCDwarfFiles;
+  MCDwarfLineTableHeader() : Label(nullptr) {}
   unsigned getFile(StringRef Directory, StringRef FileName, unsigned FileNumber);
   std::pair<MCSymbol *, MCSymbol *> Emit(MCStreamer *MCOS) const;
 };