This is an archive of the discontinued LLVM Phabricator instance.

[ClangExpressionParser] Reuse the FileManager from the compiler instance.
ClosedPublic

Authored by JDevlieghere on Feb 13 2019, 8:50 PM.

Details

Summary

I was looking at the ClangExpressionParser and noticed that we have a FileManager owned by the expression parser and later ask the compiler instance to create a new FileManager, owned by the clang CI. Looking at the code I don't see a good reason for having two instances. This patch removes the one owned by LLDB.

Diff Detail

Event Timeline

JDevlieghere created this revision.Feb 13 2019, 8:50 PM

Keep/move the comment in the right place.

This revision is now accepted and ready to land.Feb 14 2019, 1:28 AM
This revision was automatically updated to reflect the committed changes.

This change was probably due to things changing over time and there may be more of these kinds of cleanups to be had. nice catch.