From c17c8bf749e8c9c8e452e4b9cf669e8edf9461de Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Tue, 10 Jul 2018 14:41:54 +0000 Subject: 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 --- llvm/lib/MC/MCObjectStreamer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/MC/MCObjectStreamer.cpp') 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); -- cgit v1.2.3