This is an archive of the discontinued LLVM Phabricator instance.

Modules: Rename MemoryBufferCache to InMemoryModuleCache
ClosedPublic

Authored by dexonsmith on Mar 3 2019, 9:51 PM.

Details

Summary

Change MemoryBufferCache to InMemoryModuleCache, moving it from Basic to
Serialization. Another patch will start using it to manage module build
more explicitly, but this is split out because it's mostly mechanical.

Because of the move to Serialization we can no longer abuse the
Preprocessor to forward it to the ASTReader. Besides the rename and
file move, that means Preprocessor::Preprocessor has one fewer parameter
and ASTReader::ASTReader has one more.

Diff Detail

Event Timeline

dexonsmith created this revision.Mar 3 2019, 9:51 PM
bruno added a comment.Mar 4 2019, 2:31 PM

InMemoryModuleCache seems like a way more appropriate name here. Also thanks for improving some of the comments.

Because of the move to Serialization we can no longer abuse the Preprocessor to forward it to the ASTReader. Besides the rename and file move, that means Preprocessor::Preprocessor has one fewer parameter and ASTReader::ASTReader has one more.

Are there any C api bits that expose preprocessor stuff and also need updates?

InMemoryModuleCache seems like a way more appropriate name here. Also thanks for improving some of the comments.

Because of the move to Serialization we can no longer abuse the Preprocessor to forward it to the ASTReader. Besides the rename and file move, that means Preprocessor::Preprocessor has one fewer parameter and ASTReader::ASTReader has one more.

Are there any C api bits that expose preprocessor stuff and also need updates?

ninja check-clang passes... is there anything else I should be testing?

bruno accepted this revision.Mar 6 2019, 10:09 AM

ninja check-clang passes... is there anything else I should be testing?

I'm not sure, just double checking :)

The general approach LGTM though.

This revision is now accepted and ready to land.Mar 6 2019, 10:09 AM
dexonsmith closed this revision.Mar 9 2019, 9:33 AM

Committed in r355777.

clang/include/clang/Serialization/ModuleManager.h