path prefix mapping: enforce path matching
Force the prefix string to match a complete prefix in the
path to remap, and strip any trailing path separators from
the resulting path.
Allows -ffile-prefix-map=/a=b /a/test.c to be remapped to b/test.c
and -ffile-prefix-map==/fake_prefix /a/test.c to become
/fake_prefix/a/test.c.
Likewise, -ffile-prefix-map=/a= /a/test.c becomes test.c instead of
/test.c. For the latter you'd use -ffile-prefix-map=/a=/.
Merge remote-tracking branch 'llvm/master' into D49466
Do not remap MainFileName twice.
Merge remote-tracking branch 'llvm/master' into D49466
Path: enhance prefix mapping
Return true when a path is remapped, and allow replacing the
original path entirely.
Break on first match.
Merge remote-tracking branch 'llvm/master' into D49466
Style fix
Unit test updates
Clean up path handling some more
Rewrite path prefix replacement
Add a bunch of tests for odd corner cases.
Merge remote-tracking branch 'llvm/master' into D49466
Address path feedback
Use new flag in clang
Get contract in order