Honor -fdebug-prefix-map when creating function names for the debug info.
authorAdrian Prantl <aprantl@apple.com>
Wed, 5 Dec 2018 18:37:44 +0000 (18:37 +0000)
committerAdrian Prantl <aprantl@apple.com>
Wed, 5 Dec 2018 18:37:44 +0000 (18:37 +0000)
commit56acd5a66ea3800a23be0cfdbc422624398cb096
tree275b664f4bc239ea72d9d995bd23ac5022e590b0
parenta717bc78b7723cfff52fdb3d9e928cf2c69a87b5
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: 348397
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]