Page MenuHomePhabricator

Use the VFS from the CompilerInvocation by default
ClosedPublic

Authored by teemperor on Sep 2 2017, 5:59 PM.

Details

Summary

The CompilerInstance should create its default VFS from its CompilerInvocation. Right now the
user has to manually create the VFS before creating the FileManager even though
-ivfsoverlay file.yaml was passed via the CompilerInvocation (which is exactly how we worked
around this issue in FrontendAction.cpp so far).

This patch uses the invocation's VFS by default and also tests this behavior now from the
point of view of a program that uses the clang API.

Diff Detail

Repository
rL LLVM

Event Timeline

teemperor created this revision.Sep 2 2017, 5:59 PM

You should probably update the code creating the vfs before the call to createFileManager in lib/Frontend/FrontendAction.cpp.

teemperor updated this revision to Diff 114504.Sep 10 2017, 2:02 AM
  • Added test case.
teemperor updated this revision to Diff 114524.Sep 10 2017, 6:59 AM
  • Moved code from FrontendAction.cpp into createFileManager()
v.g.vassilev accepted this revision.Sep 11 2017, 1:54 AM

This patch can rely on a post commit review if necessary.

This revision is now accepted and ready to land.Sep 11 2017, 1:54 AM
teemperor edited the summary of this revision. (Show Details)Sep 12 2017, 2:52 AM
teemperor updated this revision to Diff 114790.Sep 12 2017, 3:05 AM
  • Rebased diff before merging.
teemperor updated this revision to Diff 114823.Sep 12 2017, 6:42 AM
  • Rebased with the correct diff...
This revision was automatically updated to reflect the committed changes.