[llvm] r176605 - Debug Info: store the files and directories for each compile unit.

Manman Ren mren at apple.com
Tue Mar 12 13:18:31 PDT 2013


On Mar 8, 2013, at 12:44 PM, Eric Christopher <echristo at gmail.com> wrote:

> Shouldn't be much if any due to the reduction in output, but also why I asked for a SmallVector to keep memory usage down. I'll let Manman get you numbers though :)

In r176893 to replace std::vector with SmallVector.

-Manman
> 
> -eric
> 
> 
> On Fri, Mar 8, 2013 at 12:12 PM, Evan Cheng <evan.cheng at apple.com> wrote:
> Is there any compile time impact? I always worry when I see data structure like map of vectors.
> 
> Evan
> 
> On Mar 6, 2013, at 5:42 PM, Manman Ren <mren at apple.com> wrote:
> 
> > Author: mren
> > Date: Wed Mar  6 19:42:00 2013
> > New Revision: 176605
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=176605&view=rev
> > Log:
> > Debug Info: store the files and directories for each compile unit.
> >
> > We now emit a line table for each compile unit. To reduce the prologue size
> > of each line table, the files and directories used by each compile unit are
> > stored in std::map<unsigned, std::vector< > > instead of std::vector< >.
> >
> > The prologue for a lto'ed image can be as big as 93K. Duplicating 93K for each
> > compile unit causes a huge increase of debug info. With this patch, each
> > prologue will only emit the files required by the compile unit.
> >
> > rdar://problem/13342023
> >
> > Modified:
> >    llvm/trunk/include/llvm/MC/MCContext.h
> >    llvm/trunk/include/llvm/MC/MCStreamer.h
> >    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
> >    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
> >    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
> >    llvm/trunk/lib/MC/MCAsmStreamer.cpp
> >    llvm/trunk/lib/MC/MCContext.cpp
> >    llvm/trunk/lib/MC/MCDwarf.cpp
> >    llvm/trunk/lib/MC/MCNullStreamer.cpp
> >    llvm/trunk/lib/MC/MCPureStreamer.cpp
> >    llvm/trunk/lib/MC/MCStreamer.cpp
> >    llvm/trunk/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll
> >
> > Modified: llvm/trunk/include/llvm/MC/MCContext.h
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCContext.h?rev=176605&r1=176604&r2=176605&view=diff
> > ==============================================================================
> > --- llvm/trunk/include/llvm/MC/MCContext.h (original)
> > +++ llvm/trunk/include/llvm/MC/MCContext.h Wed Mar  6 19:42:00 2013
> > @@ -17,6 +17,7 @@
> > #include "llvm/Support/Allocator.h"
> > #include "llvm/Support/Compiler.h"
> > #include "llvm/Support/raw_ostream.h"
> > +#include <map>
> > #include <vector> // FIXME: Shouldn't be needed.
> >
> > namespace llvm {
> > @@ -101,8 +102,12 @@ namespace llvm {
> >     std::string MainFileName;
> >
> >     /// The dwarf file and directory tables from the dwarf .file directive.
> > -    std::vector<MCDwarfFile *> MCDwarfFiles;
> > -    std::vector<StringRef> MCDwarfDirs;
> > +    /// We now emit a line table for each compile unit. To reduce the prologue
> > +    /// size of each line table, the files and directories used by each compile
> > +    /// unit are separated.
> > +    typedef std::map<unsigned, std::vector<MCDwarfFile *> > MCDwarfFilesMap;
> > +    MCDwarfFilesMap MCDwarfFilesCUMap;
> > +    std::map<unsigned, std::vector<StringRef> > MCDwarfDirsCUMap;
> >
> >     /// The current dwarf line information from the last dwarf .loc directive.
> >     MCDwarfLoc CurrentDwarfLoc;
> > @@ -282,19 +287,25 @@ namespace llvm {
> >
> >     /// GetDwarfFile - creates an entry in the dwarf file and directory tables.
> >     unsigned GetDwarfFile(StringRef Directory, StringRef FileName,
> > -                          unsigned FileNumber);
> > +                          unsigned FileNumber, unsigned CUID);
> >
> > -    bool isValidDwarfFileNumber(unsigned FileNumber);
> > +    bool isValidDwarfFileNumber(unsigned FileNumber, unsigned CUID = 0);
> >
> >     bool hasDwarfFiles() const {
> > -      return !MCDwarfFiles.empty();
> > +      // Traverse MCDwarfFilesCUMap and check whether each entry is empty.
> > +      MCDwarfFilesMap::const_iterator MapB, MapE;
> > +      for (MapB = MCDwarfFilesCUMap.begin(), MapE = MCDwarfFilesCUMap.end();
> > +           MapB != MapE; MapB++)
> > +        if (!MapB->second.empty())
> > +           return true;
> > +      return false;
> >     }
> >
> > -    const std::vector<MCDwarfFile *> &getMCDwarfFiles() {
> > -      return MCDwarfFiles;
> > +    const std::vector<MCDwarfFile *> &getMCDwarfFiles(unsigned CUID = 0) {
> > +      return MCDwarfFilesCUMap[CUID];
> >     }
> > -    const std::vector<StringRef> &getMCDwarfDirs() {
> > -      return MCDwarfDirs;
> > +    const std::vector<StringRef> &getMCDwarfDirs(unsigned CUID = 0) {
> > +      return MCDwarfDirsCUMap[CUID];
> >     }
> >
> >     const DenseMap<const MCSection *, MCLineSection *>
> >
> > Modified: llvm/trunk/include/llvm/MC/MCStreamer.h
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=176605&r1=176604&r2=176605&view=diff
> > ==============================================================================
> > --- llvm/trunk/include/llvm/MC/MCStreamer.h (original)
> > +++ llvm/trunk/include/llvm/MC/MCStreamer.h Wed Mar  6 19:42:00 2013
> > @@ -525,7 +525,7 @@ namespace llvm {
> >     /// file number.  This implements the DWARF2 '.file 4 "foo.c"' assembler
> >     /// directive.
> >     virtual bool EmitDwarfFileDirective(unsigned FileNo, StringRef Directory,
> > -                                        StringRef Filename);
> > +                                        StringRef Filename, unsigned CUID = 0);
> >
> >     /// EmitDwarfLocDirective - This implements the DWARF2
> >     // '.loc fileno lineno ...' assembler directive.
> >
> > Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=176605&r1=176604&r2=176605&view=diff
> > ==============================================================================
> > --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
> > +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Wed Mar  6 19:42:00 2013
> > @@ -241,7 +241,8 @@ void CompileUnit::addSourceLine(DIE *Die
> >   if (Line == 0)
> >     return;
> >   unsigned FileID = DD->getOrCreateSourceID(V.getContext().getFilename(),
> > -                                            V.getContext().getDirectory());
> > +                                            V.getContext().getDirectory(),
> > +                                            getUniqueID());
> >   assert(FileID && "Invalid file id");
> >   addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID);
> >   addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
> > @@ -257,7 +258,8 @@ void CompileUnit::addSourceLine(DIE *Die
> >   unsigned Line = G.getLineNumber();
> >   if (Line == 0)
> >     return;
> > -  unsigned FileID = DD->getOrCreateSourceID(G.getFilename(), G.getDirectory());
> > +  unsigned FileID = DD->getOrCreateSourceID(G.getFilename(), G.getDirectory(),
> > +                                            getUniqueID());
> >   assert(FileID && "Invalid file id");
> >   addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID);
> >   addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
> > @@ -276,7 +278,7 @@ void CompileUnit::addSourceLine(DIE *Die
> >     return;
> >
> >   unsigned FileID = DD->getOrCreateSourceID(SP.getFilename(),
> > -                                            SP.getDirectory());
> > +                                            SP.getDirectory(), getUniqueID());
> >   assert(FileID && "Invalid file id");
> >   addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID);
> >   addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
> > @@ -293,7 +295,7 @@ void CompileUnit::addSourceLine(DIE *Die
> >   if (Line == 0)
> >     return;
> >   unsigned FileID = DD->getOrCreateSourceID(Ty.getFilename(),
> > -                                            Ty.getDirectory());
> > +                                            Ty.getDirectory(), getUniqueID());
> >   assert(FileID && "Invalid file id");
> >   addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID);
> >   addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
> > @@ -311,7 +313,7 @@ void CompileUnit::addSourceLine(DIE *Die
> >     return;
> >   DIFile File = Ty.getFile();
> >   unsigned FileID = DD->getOrCreateSourceID(File.getFilename(),
> > -                                            File.getDirectory());
> > +                                            File.getDirectory(), getUniqueID());
> >   assert(FileID && "Invalid file id");
> >   addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID);
> >   addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
> > @@ -329,7 +331,8 @@ void CompileUnit::addSourceLine(DIE *Die
> >     return;
> >   StringRef FN = NS.getFilename();
> >
> > -  unsigned FileID = DD->getOrCreateSourceID(FN, NS.getDirectory());
> > +  unsigned FileID = DD->getOrCreateSourceID(FN, NS.getDirectory(),
> > +                                            getUniqueID());
> >   assert(FileID && "Invalid file id");
> >   addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID);
> >   addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
> >
> > Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=176605&r1=176604&r2=176605&view=diff
> > ==============================================================================
> > --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
> > +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Mar  6 19:42:00 2013
> > @@ -528,7 +528,8 @@ DIE *DwarfDebug::constructInlinedScopeDI
> >
> >   DILocation DL(Scope->getInlinedAt());
> >   TheCU->addUInt(ScopeDIE, dwarf::DW_AT_call_file, 0,
> > -                 getOrCreateSourceID(DL.getFilename(), DL.getDirectory()));
> > +                 getOrCreateSourceID(DL.getFilename(), DL.getDirectory(),
> > +                                     TheCU->getUniqueID()));
> >   TheCU->addUInt(ScopeDIE, dwarf::DW_AT_call_line, 0, DL.getLineNumber());
> >
> >   // Add name to the name table, we do this here because we're guaranteed
> > @@ -617,19 +618,28 @@ DIE *DwarfDebug::constructScopeDIE(Compi
> > // SourceIds map. This can update DirectoryNames and SourceFileNames maps
> > // as well.
> > unsigned DwarfDebug::getOrCreateSourceID(StringRef FileName,
> > -                                         StringRef DirName) {
> > +                                         StringRef DirName, unsigned CUID) {
> > +  // If we use .loc in assembly, we can't separate .file entries according to
> > +  // compile units. Thus all files will belong to the default compile unit.
> > +  if (Asm->TM.hasMCUseLoc() &&
> > +      Asm->OutStreamer.getKind() == MCStreamer::SK_AsmStreamer)
> > +    CUID = 0;
> > +
> >   // If FE did not provide a file name, then assume stdin.
> >   if (FileName.empty())
> > -    return getOrCreateSourceID("<stdin>", StringRef());
> > +    return getOrCreateSourceID("<stdin>", StringRef(), CUID);
> >
> >   // TODO: this might not belong here. See if we can factor this better.
> >   if (DirName == CompilationDir)
> >     DirName = "";
> >
> > -  unsigned SrcId = SourceIdMap.size()+1;
> > +  // FileIDCUMap stores the current ID for the given compile unit.
> > +  unsigned SrcId = FileIDCUMap[CUID] + 1;
> >
> > -  // We look up the file/dir pair by concatenating them with a zero byte.
> > +  // We look up the CUID/file/dir by concatenating them with a zero byte.
> >   SmallString<128> NamePair;
> > +  NamePair += CUID;
> > +  NamePair += '\0';
> >   NamePair += DirName;
> >   NamePair += '\0'; // Zero bytes are not allowed in paths.
> >   NamePair += FileName;
> > @@ -638,8 +648,9 @@ unsigned DwarfDebug::getOrCreateSourceID
> >   if (Ent.getValue() != SrcId)
> >     return Ent.getValue();
> >
> > +  FileIDCUMap[CUID] = SrcId;
> >   // Print out a .file directive to specify files for .loc directives.
> > -  Asm->OutStreamer.EmitDwarfFileDirective(SrcId, DirName, FileName);
> > +  Asm->OutStreamer.EmitDwarfFileDirective(SrcId, DirName, FileName, CUID);
> >
> >   return SrcId;
> > }
> > @@ -650,14 +661,17 @@ CompileUnit *DwarfDebug::constructCompil
> >   DICompileUnit DIUnit(N);
> >   StringRef FN = DIUnit.getFilename();
> >   CompilationDir = DIUnit.getDirectory();
> > -  // Call this to emit a .file directive if it wasn't emitted for the source
> > -  // file this CU comes from yet.
> > -  getOrCreateSourceID(FN, CompilationDir);
> >
> >   DIE *Die = new DIE(dwarf::DW_TAG_compile_unit);
> >   CompileUnit *NewCU = new CompileUnit(GlobalCUIndexCount++,
> >                                        DIUnit.getLanguage(), Die, Asm,
> >                                        this, &InfoHolder);
> > +
> > +  FileIDCUMap[NewCU->getUniqueID()] = 0;
> > +  // Call this to emit a .file directive if it wasn't emitted for the source
> > +  // file this CU comes from yet.
> > +  getOrCreateSourceID(FN, CompilationDir, NewCU->getUniqueID());
> > +
> >   NewCU->addString(Die, dwarf::DW_AT_producer, DIUnit.getProducer());
> >   NewCU->addUInt(Die, dwarf::DW_AT_language, dwarf::DW_FORM_data2,
> >                  DIUnit.getLanguage());
> > @@ -1707,7 +1721,8 @@ void DwarfDebug::recordSourceLine(unsign
> >     } else
> >       llvm_unreachable("Unexpected scope info");
> >
> > -    Src = getOrCreateSourceID(Fn, Dir);
> > +    Src = getOrCreateSourceID(Fn, Dir,
> > +            Asm->OutStreamer.getContext().getDwarfCompileUnitID());
> >   }
> >   Asm->OutStreamer.EmitDwarfLocDirective(Src, Line, Col, Flags, 0, 0, Fn);
> > }
> >
> > Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=176605&r1=176604&r2=176605&view=diff
> > ==============================================================================
> > --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)
> > +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Wed Mar  6 19:42:00 2013
> > @@ -305,7 +305,9 @@ class DwarfDebug {
> >   // A list of all the unique abbreviations in use.
> >   std::vector<DIEAbbrev *> Abbreviations;
> >
> > -  // Source id map, i.e. pair of source filename and directory,
> > +  // Stores the current file ID for a given compile unit.
> > +  DenseMap <unsigned, unsigned> FileIDCUMap;
> > +  // Source id map, i.e. CUID, source filename and directory,
> >   // separated by a zero byte, mapped to a unique id.
> >   StringMap<unsigned, BumpPtrAllocator&> SourceIdMap;
> >
> > @@ -626,7 +628,8 @@ public:
> >   /// \brief Look up the source id with the given directory and source file
> >   /// names. If none currently exists, create a new id and insert it in the
> >   /// SourceIds map.
> > -  unsigned getOrCreateSourceID(StringRef DirName, StringRef FullName);
> > +  unsigned getOrCreateSourceID(StringRef DirName, StringRef FullName,
> > +                               unsigned CUID);
> >
> >   /// \brief Recursively Emits a debug information entry.
> >   void emitDIE(DIE *Die, std::vector<DIEAbbrev *> *Abbrevs);
> >
> > Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=176605&r1=176604&r2=176605&view=diff
> > ==============================================================================
> > --- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
> > +++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Wed Mar  6 19:42:00 2013
> > @@ -215,7 +215,7 @@ public:
> >
> >   virtual void EmitFileDirective(StringRef Filename);
> >   virtual bool EmitDwarfFileDirective(unsigned FileNo, StringRef Directory,
> > -                                      StringRef Filename);
> > +                                      StringRef Filename, unsigned CUID = 0);
> >   virtual void EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
> >                                      unsigned Column, unsigned Flags,
> >                                      unsigned Isa, unsigned Discriminator,
> > @@ -828,14 +828,14 @@ void MCAsmStreamer::EmitFileDirective(St
> > }
> >
> > bool MCAsmStreamer::EmitDwarfFileDirective(unsigned FileNo, StringRef Directory,
> > -                                           StringRef Filename) {
> > +                                           StringRef Filename, unsigned CUID) {
> >   if (!UseDwarfDirectory && !Directory.empty()) {
> >     if (sys::path::is_absolute(Filename))
> > -      return EmitDwarfFileDirective(FileNo, "", Filename);
> > +      return EmitDwarfFileDirective(FileNo, "", Filename, CUID);
> >
> >     SmallString<128> FullPathName = Directory;
> >     sys::path::append(FullPathName, Filename);
> > -    return EmitDwarfFileDirective(FileNo, "", FullPathName);
> > +    return EmitDwarfFileDirective(FileNo, "", FullPathName, CUID);
> >   }
> >
> >   if (UseLoc) {
> > @@ -846,8 +846,11 @@ bool MCAsmStreamer::EmitDwarfFileDirecti
> >     }
> >     PrintQuotedString(Filename, OS);
> >     EmitEOL();
> > +    // All .file will belong to a single CUID.
> > +    CUID = 0;
> >   }
> > -  return this->MCStreamer::EmitDwarfFileDirective(FileNo, Directory, Filename);
> > +  return this->MCStreamer::EmitDwarfFileDirective(FileNo, Directory, Filename,
> > +                                                  CUID);
> > }
> >
> > void MCAsmStreamer::EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
> >
> > Modified: llvm/trunk/lib/MC/MCContext.cpp
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCContext.cpp?rev=176605&r1=176604&r2=176605&view=diff
> > ==============================================================================
> > --- llvm/trunk/lib/MC/MCContext.cpp (original)
> > +++ llvm/trunk/lib/MC/MCContext.cpp Wed Mar  6 19:42:00 2013
> > @@ -77,8 +77,8 @@ void MCContext::reset() {
> >   Symbols.clear();
> >   Allocator.Reset();
> >   Instances.clear();
> > -  MCDwarfFiles.clear();
> > -  MCDwarfDirs.clear();
> > +  MCDwarfFilesCUMap.clear();
> > +  MCDwarfDirsCUMap.clear();
> >   MCGenDwarfLabelEntries.clear();
> >   DwarfDebugFlags = StringRef();
> >   MCLineSections.clear();
> > @@ -299,11 +299,13 @@ const MCSection *MCContext::getCOFFSecti
> > /// error and zero is returned and the client reports the error, else the
> > /// allocated file number is returned.  The file numbers may be in any order.
> > unsigned MCContext::GetDwarfFile(StringRef Directory, StringRef FileName,
> > -                                 unsigned FileNumber) {
> > +                                 unsigned FileNumber, unsigned CUID) {
> >   // TODO: a FileNumber of zero says to use the next available file number.
> >   // Note: in GenericAsmParser::ParseDirectiveFile() FileNumber was checked
> >   // to not be less than one.  This needs to be change to be not less than zero.
> >
> > +  std::vector<MCDwarfFile *>& MCDwarfFiles = MCDwarfFilesCUMap[CUID];
> > +  std::vector<StringRef>& MCDwarfDirs = MCDwarfDirsCUMap[CUID];
> >   // Make space for this FileNumber in the MCDwarfFiles vector if needed.
> >   if (FileNumber >= MCDwarfFiles.size()) {
> >     MCDwarfFiles.resize(FileNumber + 1);
> > @@ -363,7 +365,8 @@ unsigned MCContext::GetDwarfFile(StringR
> >
> > /// isValidDwarfFileNumber - takes a dwarf file number and returns true if it
> > /// currently is assigned and false otherwise.
> > -bool MCContext::isValidDwarfFileNumber(unsigned FileNumber) {
> > +bool MCContext::isValidDwarfFileNumber(unsigned FileNumber, unsigned CUID) {
> > +  std::vector<MCDwarfFile *>& MCDwarfFiles = MCDwarfFilesCUMap[CUID];
> >   if(FileNumber == 0 || FileNumber >= MCDwarfFiles.size())
> >     return false;
> >
> >
> > Modified: llvm/trunk/lib/MC/MCDwarf.cpp
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDwarf.cpp?rev=176605&r1=176604&r2=176605&view=diff
> > ==============================================================================
> > --- llvm/trunk/lib/MC/MCDwarf.cpp (original)
> > +++ llvm/trunk/lib/MC/MCDwarf.cpp Wed Mar  6 19:42:00 2013
> > @@ -299,7 +299,7 @@ const MCSymbol *MCDwarfFileTable::EmitCU
> >
> >   // First the directory table.
> >   const std::vector<StringRef> &MCDwarfDirs =
> > -    context.getMCDwarfDirs();
> > +    context.getMCDwarfDirs(CUID);
> >   for (unsigned i = 0; i < MCDwarfDirs.size(); i++) {
> >     MCOS->EmitBytes(MCDwarfDirs[i]); // the DirectoryName
> >     MCOS->EmitBytes(StringRef("\0", 1)); // the null term. of the string
> > @@ -308,7 +308,7 @@ const MCSymbol *MCDwarfFileTable::EmitCU
> >
> >   // Second the file table.
> >   const std::vector<MCDwarfFile *> &MCDwarfFiles =
> > -    MCOS->getContext().getMCDwarfFiles();
> > +    MCOS->getContext().getMCDwarfFiles(CUID);
> >   for (unsigned i = 1; i < MCDwarfFiles.size(); i++) {
> >     MCOS->EmitBytes(MCDwarfFiles[i]->getName()); // FileName
> >     MCOS->EmitBytes(StringRef("\0", 1)); // the null term. of the string
> >
> > Modified: llvm/trunk/lib/MC/MCNullStreamer.cpp
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCNullStreamer.cpp?rev=176605&r1=176604&r2=176605&view=diff
> > ==============================================================================
> > --- llvm/trunk/lib/MC/MCNullStreamer.cpp (original)
> > +++ llvm/trunk/lib/MC/MCNullStreamer.cpp Wed Mar  6 19:42:00 2013
> > @@ -89,7 +89,7 @@ namespace {
> >
> >     virtual void EmitFileDirective(StringRef Filename) {}
> >     virtual bool EmitDwarfFileDirective(unsigned FileNo, StringRef Directory,
> > -                                        StringRef Filename) {
> > +                                        StringRef Filename, unsigned CUID = 0) {
> >       return false;
> >     }
> >     virtual void EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
> >
> > Modified: llvm/trunk/lib/MC/MCPureStreamer.cpp
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCPureStreamer.cpp?rev=176605&r1=176604&r2=176605&view=diff
> > ==============================================================================
> > --- llvm/trunk/lib/MC/MCPureStreamer.cpp (original)
> > +++ llvm/trunk/lib/MC/MCPureStreamer.cpp Wed Mar  6 19:42:00 2013
> > @@ -95,7 +95,7 @@ public:
> >     report_fatal_error("unsupported directive in pure streamer");
> >   }
> >   virtual bool EmitDwarfFileDirective(unsigned FileNo, StringRef Directory,
> > -                                      StringRef Filename) {
> > +                                      StringRef Filename, unsigned CUID = 0) {
> >     report_fatal_error("unsupported directive in pure streamer");
> >   }
> >
> >
> > Modified: llvm/trunk/lib/MC/MCStreamer.cpp
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCStreamer.cpp?rev=176605&r1=176604&r2=176605&view=diff
> > ==============================================================================
> > --- llvm/trunk/lib/MC/MCStreamer.cpp (original)
> > +++ llvm/trunk/lib/MC/MCStreamer.cpp Wed Mar  6 19:42:00 2013
> > @@ -157,8 +157,8 @@ void MCStreamer::EmitFill(uint64_t NumBy
> >
> > bool MCStreamer::EmitDwarfFileDirective(unsigned FileNo,
> >                                         StringRef Directory,
> > -                                        StringRef Filename) {
> > -  return getContext().GetDwarfFile(Directory, Filename, FileNo) == 0;
> > +                                        StringRef Filename, unsigned CUID) {
> > +  return getContext().GetDwarfFile(Directory, Filename, FileNo, CUID) == 0;
> > }
> >
> > void MCStreamer::EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
> >
> > Modified: llvm/trunk/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll?rev=176605&r1=176604&r2=176605&view=diff
> > ==============================================================================
> > --- llvm/trunk/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll (original)
> > +++ llvm/trunk/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll Wed Mar  6 19:42:00 2013
> > @@ -9,13 +9,16 @@
> >
> > ; CHECK: DW_TAG_compile_unit
> > ; CHECK: DW_AT_low_pc [DW_FORM_addr]       (0x0000000000000000)
> > -; CHECK: DW_AT_stmt_list [DW_FORM_data4]   (0x00000049)
> > +; CHECK: DW_AT_stmt_list [DW_FORM_data4]   (0x0000003c)
> >
> > ; CHECK: .debug_line contents:
> > ; CHECK-NEXT: Line table prologue:
> > -; CHECK-NEXT: total_length: 0x00000045
> > +; CHECK-NEXT: total_length: 0x00000038
> > +; CHECK: file_names[  1]    0 0x00000000 0x00000000 simple.c
> > ; CHECK: Line table prologue:
> > -; CHECK: total_length: 0x00000047
> > +; CHECK-NEXT: total_length: 0x00000039
> > +; CHECK: file_names[  1]    0 0x00000000 0x00000000 simple2.c
> > +; CHECK-NOT: file_names
> >
> > define i32 @test(i32 %a) nounwind uwtable ssp {
> > entry:
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130312/76a1dd42/attachment.html>


More information about the llvm-commits mailing list