OSDN Git Service

Use debug-prefix-map for AT_NAME
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 11 Jul 2018 12:30:35 +0000 (12:30 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 11 Jul 2018 12:30:35 +0000 (12:30 +0000)
commitf0c06bd76735355c783a7ce199de5f9d429aa773
treee12a72f00a75ccf4f00b613364c20d7f683c9775
parentbe9aa7feff2977f177840417d45d0eaecf7849cf
Use debug-prefix-map for AT_NAME

AT_NAME was being emitted before the directory paths were remapped. This
ensures that all paths are remapped before anything is emitted.

An additional test case has been added.

Note that this only works if the replacement string is an absolute path.
If not, then AT_decl_file believes the new path is a relative path, and
joins that path with the compilation directory. I do not know of a good
way to resolve this.

Patch by: Siddhartha Bagaria (starsid)

Differential revision: https://reviews.llvm.org/D49169

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336793 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCContext.h
include/llvm/MC/MCDwarf.h
lib/MC/MCContext.cpp
lib/MC/MCDwarf.cpp
lib/MC/MCObjectStreamer.cpp
test/MC/ELF/debug-prefix-map.s