summaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-03-17 18:13:58 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-03-17 18:13:58 +0000
commitdaeeb3737339913554f3c5dd822be5108b807cd6 (patch)
tree93d693dec3899be22979016ebeeddc8eada4fb70 /include/llvm
parent03a3f643b1b7c7ca1d413f0d7bd2e4c89fe40a56 (diff)
downloadllvm-daeeb3737339913554f3c5dd822be5108b807cd6.tar.gz
llvm-daeeb3737339913554f3c5dd822be5108b807cd6.tar.bz2
llvm-daeeb3737339913554f3c5dd822be5108b807cd6.tar.xz
DebugInfo: Use MC line table file entry uniquing for non-asm input as well.
See r204027 for the precursor to this that applied to asm debug info. This required some non-obvious API changes to handle the case of asm output (we never go asm->asm so this didn't come up in r204027): the modification of the file/directory name by MCDwarfLineTableHeader needed to be reflected in the MCAsmStreamer caller so it could print the appropriate .file directive, so those StringRef parameters are now non-const ref (in/out) parameters rather than just const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204069 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/MC/MCDwarf.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/MC/MCDwarf.h b/include/llvm/MC/MCDwarf.h
index 3b60450614..720da188aa 100644
--- a/include/llvm/MC/MCDwarf.h
+++ b/include/llvm/MC/MCDwarf.h
@@ -182,7 +182,8 @@ struct MCDwarfLineTableHeader {
SmallVector<MCDwarfFile, 3> MCDwarfFiles;
StringMap<unsigned> SourceIdMap;
MCDwarfLineTableHeader() : Label(nullptr) {}
- unsigned getFile(StringRef Directory, StringRef FileName, unsigned FileNumber = 0);
+ unsigned getFile(StringRef &Directory, StringRef &FileName,
+ unsigned FileNumber = 0);
std::pair<MCSymbol *, MCSymbol *> Emit(MCStreamer *MCOS) const;
};
@@ -197,7 +198,8 @@ public:
// This emits the Dwarf file and the line tables for a given Compile Unit.
const MCSymbol *EmitCU(MCStreamer *MCOS) const;
- unsigned getFile(StringRef Directory, StringRef FileName, unsigned FileNumber = 0);
+ unsigned getFile(StringRef &Directory, StringRef &FileName,
+ unsigned FileNumber = 0);
MCSymbol *getLabel() const {
return Header.Label;