diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2019-08-26 20:32:05 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2019-08-26 20:32:05 +0000 |
commit | f5848190854cb19280ae2fa465b6f199ed4f896f (patch) | |
tree | fc9d60369abb3b7776e21adf45b7027ccb67b95f /clang/lib/AST/ASTImporter.cpp | |
parent | 33d563e59ed97d03a7508c06bbff3967d687dede (diff) | |
download | bcm5719-llvm-f5848190854cb19280ae2fa465b6f199ed4f896f.tar.gz bcm5719-llvm-f5848190854cb19280ae2fa465b6f199ed4f896f.zip |
ContentCache: Drop getBuffer's dependency on SourceManager
Refactor ContentCache::IsSystemFile to IsFileVolatile, checking
SourceManager::userFilesAreVolatile at construction time. This is a
step toward lowering ContentCache down from SourceManager to
FileManager.
No functionality change intended.
https://reviews.llvm.org/D66713
llvm-svn: 369958
Diffstat (limited to 'clang/lib/AST/ASTImporter.cpp')
-rw-r--r-- | clang/lib/AST/ASTImporter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp index e54677c2dcf..8a442bbef66 100644 --- a/clang/lib/AST/ASTImporter.cpp +++ b/clang/lib/AST/ASTImporter.cpp @@ -8503,8 +8503,9 @@ Expected<FileID> ASTImporter::Import(FileID FromID, bool IsBuiltin) { if (ToID.isInvalid() || IsBuiltin) { // FIXME: We want to re-use the existing MemoryBuffer! bool Invalid = true; - const llvm::MemoryBuffer *FromBuf = Cache->getBuffer( - FromContext.getDiagnostics(), FromSM, SourceLocation{}, &Invalid); + const llvm::MemoryBuffer *FromBuf = + Cache->getBuffer(FromContext.getDiagnostics(), + FromSM.getFileManager(), SourceLocation{}, &Invalid); if (!FromBuf || Invalid) // FIXME: Use a new error kind? return llvm::make_error<ImportError>(ImportError::Unknown); |