Honor -fdebug-prefix-map when creating function names for the debug info.
authorAdrian Prantl <aprantl@apple.com>
Sat, 1 Dec 2018 00:24:27 +0000 (00:24 +0000)
committerAdrian Prantl <aprantl@apple.com>
Sat, 1 Dec 2018 00:24:27 +0000 (00:24 +0000)
commitbef4f92a3b05e98155950adf6fa17fcf21fc8c71
tree3c45a8c3e3b456e0654d64087fc54514c02f1a90
parentb07298eeddd95c294ee877daa64f5f3ecf92a78e
Honor -fdebug-prefix-map when creating function names for the debug info.

This adds a callback to PrintingPolicy to allow CGDebugInfo to remap
file paths according to -fdebug-prefix-map. Otherwise the debug info
(particularly function names for C++ lambdas) may contain paths that
should have been remapped in the debug info.

<rdar://problem/46128056>

Differential Revision: https://reviews.llvm.org/D55137

llvm-svn: 348060
clang/include/clang/AST/PrettyPrinter.h
clang/lib/AST/TypePrinter.cpp
clang/lib/CodeGen/CGDebugInfo.cpp
clang/lib/CodeGen/CGDebugInfo.h
clang/test/CodeGenCXX/debug-prefix-map-lambda.cpp [new file with mode: 0644]