diff options
author | Paul Robinson <paul.robinson@sony.com> | 2018-06-20 17:08:46 +0000 |
---|---|---|
committer | Paul Robinson <paul.robinson@sony.com> | 2018-06-20 17:08:46 +0000 |
commit | 8e3e374e5f72d7a89a0903b0d1c8fbd18b2b8f9d (patch) | |
tree | a5fdd199c481f8b6e318fd0a15db769e54e7abc1 /llvm/lib/MC/MCDwarf.cpp | |
parent | 34b91122166186669bd52abaf04c1b294055b8a7 (diff) | |
download | bcm5719-llvm-8e3e374e5f72d7a89a0903b0d1c8fbd18b2b8f9d.tar.gz bcm5719-llvm-8e3e374e5f72d7a89a0903b0d1c8fbd18b2b8f9d.zip |
[DWARF] Don't keep a ref to possibly stack allocated data.
llvm-svn: 335146
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); |