diff options
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 e7c805da9a9..37e1263be65 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -389,8 +389,8 @@ 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 : CompilationDir; + const StringRef CompDir = + CompilationDir.empty() ? CtxCompilationDir : StringRef(CompilationDir); if (LineStr) { // Record path strings, emit references here. LineStr->emitRef(MCOS, CompDir); |