summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectStreamer.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2018-07-10 14:41:54 +0000
committerPaul Robinson <paul.robinson@sony.com>2018-07-10 14:41:54 +0000
commitc17c8bf749e8c9c8e452e4b9cf669e8edf9461de (patch)
treeb5e375b17ad4b398d258a21bb804f6a639ea86af /llvm/lib/MC/MCObjectStreamer.cpp
parent3333106a6248635accab6d5b8c2f737ba5d06e6d (diff)
downloadbcm5719-llvm-c17c8bf749e8c9c8e452e4b9cf669e8edf9461de.tar.gz
bcm5719-llvm-c17c8bf749e8c9c8e452e4b9cf669e8edf9461de.zip
Support -fdebug-prefix-map in llvm-mc. This is useful to omit the
debug compilation dir when compiling assembly files with -g. Part of PR38050. Patch by Siddhartha Bagaria! Differential Revision: https://reviews.llvm.org/D48988 llvm-svn: 336680
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCObjectStreamer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp
index 432f4c242a8..8122af459b7 100644
--- a/llvm/lib/MC/MCObjectStreamer.cpp
+++ b/llvm/lib/MC/MCObjectStreamer.cpp
@@ -661,6 +661,9 @@ void MCObjectStreamer::EmitFileDirective(StringRef Filename) {
}
void MCObjectStreamer::FinishImpl() {
+ // Remap the compilation directory before emitting.
+ getContext().RemapCompilationDir();
+
// If we are generating dwarf for assembly source files dump out the sections.
if (getContext().getGenDwarfForAssembly())
MCGenDwarfInfo::Emit(this);
OpenPOWER on IntegriCloud