aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCDwarf.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2019-04-12 01:02:02 +0000
committerEric Christopher <echristo@gmail.com>2019-04-12 01:02:02 +0000
commit492cad51a470964aac2351acf7e65d52dc4c04d5 (patch)
tree682b8a3d6821a117105a56569acdbd254a5bfc33 /llvm/lib/MC/MCDwarf.cpp
parentef202c308b5f0335104e0eab72f8ae6c3706874e (diff)
downloadllvm-492cad51a470964aac2351acf7e65d52dc4c04d5.zip
llvm-492cad51a470964aac2351acf7e65d52dc4c04d5.tar.gz
llvm-492cad51a470964aac2351acf7e65d52dc4c04d5.tar.bz2
Remove a parameter that was being passed around that we had at the
local callsite. NFC. llvm-svn: 358244
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index f59d91d..ebc45f4 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -378,8 +378,7 @@ static void emitOneV5FileEntry(MCStreamer *MCOS, const MCDwarfFile &DwarfFile,
}
void MCDwarfLineTableHeader::emitV5FileDirTables(
- MCStreamer *MCOS, Optional<MCDwarfLineStr> &LineStr,
- StringRef CtxCompilationDir) const {
+ MCStreamer *MCOS, Optional<MCDwarfLineStr> &LineStr) const {
// The directory format, which is just a list of the directory paths. In a
// non-split object, these are references to .debug_line_str; in a split
// object, they are inline strings.
@@ -389,8 +388,9 @@ void MCDwarfLineTableHeader::emitV5FileDirTables(
: dwarf::DW_FORM_string);
MCOS->EmitULEB128IntValue(MCDwarfDirs.size() + 1);
// Try not to emit an empty compilation directory.
- const StringRef CompDir =
- CompilationDir.empty() ? CtxCompilationDir : StringRef(CompilationDir);
+ const StringRef CompDir = CompilationDir.empty()
+ ? MCOS->getContext().getCompilationDir()
+ : StringRef(CompilationDir);
if (LineStr) {
// Record path strings, emit references here.
LineStr->emitRef(MCOS, CompDir);
@@ -509,7 +509,7 @@ MCDwarfLineTableHeader::Emit(MCStreamer *MCOS, MCDwarfLineTableParams Params,
// Put out the directory and file tables. The formats vary depending on
// the version.
if (LineTableVersion >= 5)
- emitV5FileDirTables(MCOS, LineStr, context.getCompilationDir());
+ emitV5FileDirTables(MCOS, LineStr);
else
emitV2FileDirTables(MCOS);