aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTImporter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-23 08:35:12 +0000
committerChris Lattner <sabre@nondot.org>2010-11-23 08:35:12 +0000
commit39b49bcaaddb1049234fca9500c0ac02c088e23d (patch)
tree4f7ac9da3cf2bcbad0aebfb781b7635462b431cf /lib/AST/ASTImporter.cpp
parent458b5e25052a1052eb873f9145298e0f0aa75cd1 (diff)
now the FileManager has a FileSystemOpts ivar, stop threading
FileSystemOpts through a ton of apis, simplifying a lot of code. This also fixes a latent bug in ASTUnit where it would invoke methods on FileManager without creating one in some code paths in cindextext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTImporter.cpp')
-rw-r--r--lib/AST/ASTImporter.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp
index 980e93c04d..fcd9caa304 100644
--- a/lib/AST/ASTImporter.cpp
+++ b/lib/AST/ASTImporter.cpp
@@ -3015,12 +3015,9 @@ Expr *ASTNodeImporter::VisitCStyleCastExpr(CStyleCastExpr *E) {
}
ASTImporter::ASTImporter(ASTContext &ToContext, FileManager &ToFileManager,
- const FileSystemOptions &ToFileSystemOpts,
- ASTContext &FromContext, FileManager &FromFileManager,
- const FileSystemOptions &FromFileSystemOpts)
+ ASTContext &FromContext, FileManager &FromFileManager)
: ToContext(ToContext), FromContext(FromContext),
- ToFileManager(ToFileManager), FromFileManager(FromFileManager),
- ToFileSystemOpts(ToFileSystemOpts), FromFileSystemOpts(FromFileSystemOpts) {
+ ToFileManager(ToFileManager), FromFileManager(FromFileManager) {
ImportedDecls[FromContext.getTranslationUnitDecl()]
= ToContext.getTranslationUnitDecl();
}
@@ -3190,8 +3187,7 @@ FileID ASTImporter::Import(FileID FromID) {
// disk again
// FIXME: We definitely want to re-use the existing MemoryBuffer, rather
// than mmap the files several times.
- const FileEntry *Entry = ToFileManager.getFile(Cache->Entry->getName(),
- ToFileSystemOpts);
+ const FileEntry *Entry = ToFileManager.getFile(Cache->Entry->getName());
ToID = ToSM.createFileID(Entry, ToIncludeLoc,
FromSLoc.getFile().getFileCharacteristic());
} else {