Commit Graph

3 Commits

Author SHA1 Message Date
NAKAMURA Takumi 38c2f6cb20 Tweak clang/test/CodeGen/debug-prefix-map.c to appease win32 hosts.
!1 = !DIFile(filename: "/var/empty\5C<stdin>", directory: "E:\5Cllvm\5Cbuild\5Ccmake-ninja\5Ctools\5Cclang\5Ctest\5CCodeGen")

llvm-svn: 250136
2015-10-13 00:38:06 +00:00
Saleem Abdulrasool 83346258eb test: relax path matching for windows
The test failed on Windows due to use of \ as a path separator rather than /.

llvm-svn: 250111
2015-10-12 21:19:27 +00:00
Saleem Abdulrasool 436256a713 Support Debug Info path remapping
Add support for the `-fdebug-prefix-map=` option as in GCC.  The syntax is
`-fdebug-prefix-map=OLD=NEW`.  When compiling files from a path beginning with
OLD, change the debug info to indicate the path as start with NEW.  This is
particularly helpful if you are preprocessing in one path and compiling in
another (e.g. for a build cluster with distcc).

Note that the linearity of the implementation is not as terrible as it may seem.
This is normally done once per file with an expectation that the map will be
small (1-2) entries, making this roughly linear in the number of input paths.

Addresses PR24619.

llvm-svn: 250094
2015-10-12 20:21:08 +00:00