This is an archive of the discontinued LLVM Phabricator instance.

Remove m_last_file_sp from SourceManager
AbandonedPublic

Authored by emrekultursay on Mar 25 2020, 2:24 PM.

Details

Reviewers
None
Summary

...and replace it with m_last_file_spec instead.

When Source Cache is enabled, the value stored in m_last_file_sp is
already in the Source Cache, and caching it again in SourceManager
brings no extra benefit. All we need is to "remember" the last used
file, and FileSpec can serve the same purpose.

When Source Cache is disabled, the user explicitly requested no caching
of source files, and therefore, m_last_file_sp should NOT be used.

Diff Detail

Event Timeline

emrekultursay created this revision.Mar 25 2020, 2:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2020, 2:24 PM

Adding 3rd commit to diff

  • Remove m_last_file_sp from SourceManager
emrekultursay abandoned this revision.Mar 25 2020, 2:57 PM