Page MenuHomePhabricator

Phabricator D49466
AbandonedPublic

Authored by dankm on Jul 31 2019, 9:30 PM.

Details

Reviewers
None
Summary

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

Event Timeline

dankm created this revision.Jul 31 2019, 9:30 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 31 2019, 9:30 PM

Please fix patch title and description

dankm added a comment.Aug 8 2019, 8:09 AM

Please fix patch title and description

Sorry, I'm going to delete this. It was supposed to be a new patchset on D49466.

dankm abandoned this revision.Aug 8 2019, 8:11 AM