[llvm] r203967 - MCDwarf: Initialize MCLineTableHeader::Label

David Blaikie dblaikie at gmail.com
Fri Mar 14 13:36:45 PDT 2014


Author: dblaikie
Date: Fri Mar 14 15:36:44 2014
New Revision: 203967

URL: http://llvm.org/viewvc/llvm-project?rev=203967&view=rev
Log:
MCDwarf: Initialize MCLineTableHeader::Label

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)

Modified:
    llvm/trunk/include/llvm/MC/MCDwarf.h

Modified: llvm/trunk/include/llvm/MC/MCDwarf.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCDwarf.h?rev=203967&r1=203966&r2=203967&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCDwarf.h (original)
+++ llvm/trunk/include/llvm/MC/MCDwarf.h Fri Mar 14 15:36:44 2014
@@ -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;
 };





More information about the llvm-commits mailing list