Initial implementation of -fmacro-prefix-map and -ffile-prefix-map
authorDan McGregor <dan.mcgregor@usask.ca>
Tue, 26 Nov 2019 22:23:07 +0000 (14:23 -0800)
committerFangrui Song <maskray@google.com>
Tue, 26 Nov 2019 23:17:49 +0000 (15:17 -0800)
commit6c92cdff72251a7d13ab3958b04fba72dfcaebb1
tree109f389b97c23284a0af76927c7f1650f1fb9787
parente177c5a00da34ba61b762e2b32bd96e33b0c10b4
Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

GCC 8 implements -fmacro-prefix-map. Like -fdebug-prefix-map, it replaces a string prefix for the __FILE__ macro.
-ffile-prefix-map is the union of -fdebug-prefix-map and -fmacro-prefix-map

Reviewed By: rnk, Lekensteyn, maskray

Differential Revision: https://reviews.llvm.org/D49466
18 files changed:
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/include/clang/Driver/Options.td
clang/include/clang/Lex/PreprocessorOptions.h
clang/lib/CodeGen/CGDebugInfo.cpp
clang/lib/CodeGen/CGDebugInfo.h
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/FreeBSD.cpp
clang/lib/Driver/ToolChains/Gnu.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Lex/PPMacroExpansion.cpp
clang/test/CodeGen/debug-prefix-map.c
clang/test/Driver/debug-prefix-map.S
clang/test/Driver/debug-prefix-map.c
clang/test/Preprocessor/file_test.c [new file with mode: 0644]
clang/test/Preprocessor/file_test.h [new file with mode: 0644]
llvm/include/llvm/Support/Path.h
llvm/lib/Support/Path.cpp
llvm/unittests/Support/Path.cpp