Remove a parameter that was being passed around that we had at the

local callsite.

NFC.

llvm-svn: 358244
This commit is contained in:
Eric Christopher 2019-04-12 01:02:02 +00:00
parent ef202c308b
commit 492cad51a4
2 changed files with 6 additions and 7 deletions

View File

@ -247,8 +247,7 @@ public:
private: private:
void emitV2FileDirTables(MCStreamer *MCOS) const; void emitV2FileDirTables(MCStreamer *MCOS) const;
void emitV5FileDirTables(MCStreamer *MCOS, Optional<MCDwarfLineStr> &LineStr, void emitV5FileDirTables(MCStreamer *MCOS, Optional<MCDwarfLineStr> &LineStr) const;
StringRef CtxCompilationDir) const;
}; };
class MCDwarfDwoLineTable { class MCDwarfDwoLineTable {

View File

@ -378,8 +378,7 @@ static void emitOneV5FileEntry(MCStreamer *MCOS, const MCDwarfFile &DwarfFile,
} }
void MCDwarfLineTableHeader::emitV5FileDirTables( void MCDwarfLineTableHeader::emitV5FileDirTables(
MCStreamer *MCOS, Optional<MCDwarfLineStr> &LineStr, MCStreamer *MCOS, Optional<MCDwarfLineStr> &LineStr) const {
StringRef CtxCompilationDir) const {
// The directory format, which is just a list of the directory paths. In a // 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 // non-split object, these are references to .debug_line_str; in a split
// object, they are inline strings. // object, they are inline strings.
@ -389,8 +388,9 @@ void MCDwarfLineTableHeader::emitV5FileDirTables(
: dwarf::DW_FORM_string); : dwarf::DW_FORM_string);
MCOS->EmitULEB128IntValue(MCDwarfDirs.size() + 1); MCOS->EmitULEB128IntValue(MCDwarfDirs.size() + 1);
// Try not to emit an empty compilation directory. // Try not to emit an empty compilation directory.
const StringRef CompDir = const StringRef CompDir = CompilationDir.empty()
CompilationDir.empty() ? CtxCompilationDir : StringRef(CompilationDir); ? MCOS->getContext().getCompilationDir()
: StringRef(CompilationDir);
if (LineStr) { if (LineStr) {
// Record path strings, emit references here. // Record path strings, emit references here.
LineStr->emitRef(MCOS, CompDir); 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 // Put out the directory and file tables. The formats vary depending on
// the version. // the version.
if (LineTableVersion >= 5) if (LineTableVersion >= 5)
emitV5FileDirTables(MCOS, LineStr, context.getCompilationDir()); emitV5FileDirTables(MCOS, LineStr);
else else
emitV2FileDirTables(MCOS); emitV2FileDirTables(MCOS);