This is an archive of the discontinued LLVM Phabricator instance.

[CrossTU] Fix handling of Cross Translation Unit directory path
ClosedPublic

Authored by xazax.hun on Oct 12 2017, 5:05 AM.

Details

Summary

The function map generator tool always creates absolute path. The correct logic to determine whether a path should be handled as absolute depends on the value of the CrossTU directory. Added a unit test to avoid regressions.

Diff Detail

Repository
rL LLVM

Event Timeline

xazax.hun created this revision.Oct 12 2017, 5:05 AM
r.stahl accepted this revision.Oct 26 2017, 1:54 AM

I'm gonna go ahead and approve this now, because I reported the issue. Note that I'm not a regular contributor, yet!

lib/CrossTU/CrossTranslationUnit.cpp
99 ↗(On Diff #118773)

Here you could drop the if/else completely and just append.

This revision is now accepted and ready to land.Oct 26 2017, 1:54 AM
szepet edited edge metadata.Oct 27 2017, 5:24 AM

LGTM as well, but same note applies.

This revision was automatically updated to reflect the committed changes.