diff options
author | Manman Ren <mren@apple.com> | 2013-03-07 01:42:00 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2013-03-07 01:42:00 +0000 |
commit | 1e4272085d666ac02affbbd70d621fe386ab66b3 (patch) | |
tree | 3e3fa128182e97d1c03abb10fbc034d18a257427 /llvm/lib/MC/MCDwarf.cpp | |
parent | 96a4aa678cdcef65f63366da95c9898fcbfd70ad (diff) | |
download | bcm5719-llvm-1e4272085d666ac02affbbd70d621fe386ab66b3.tar.gz bcm5719-llvm-1e4272085d666ac02affbbd70d621fe386ab66b3.zip |
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
llvm-svn: 176605
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index fea057af3e0..c81abe952a7 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -299,7 +299,7 @@ const MCSymbol *MCDwarfFileTable::EmitCU(MCStreamer *MCOS, unsigned CUID) { // 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(MCStreamer *MCOS, unsigned CUID) { // 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 |