aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/clang/Basic/FileManager.h3
-rw-r--r--include/clang/Serialization/ASTReader.h9
2 files changed, 10 insertions, 2 deletions
diff --git a/include/clang/Basic/FileManager.h b/include/clang/Basic/FileManager.h
index bab05acba0..83fb4e0c5a 100644
--- a/include/clang/Basic/FileManager.h
+++ b/include/clang/Basic/FileManager.h
@@ -187,6 +187,9 @@ public:
/// \param openFile if true and the file exists, it will be opened.
const FileEntry *getFile(StringRef Filename, bool openFile = false);
+ /// \brief Returns the current file system options
+ const FileSystemOptions &getFileSystemOptions() { return FileSystemOpts; }
+
/// \brief Retrieve a file entry for a "virtual" file that acts as
/// if there were a file with the given name on disk. The file
/// itself is not accessed.
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h
index 0113e6f98d..591369009c 100644
--- a/include/clang/Serialization/ASTReader.h
+++ b/include/clang/Serialization/ASTReader.h
@@ -24,6 +24,8 @@
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/PreprocessingRecord.h"
#include "clang/Basic/Diagnostic.h"
+#include "clang/Basic/FileManager.h"
+#include "clang/Basic/FileSystemOptions.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/APFloat.h"
@@ -395,7 +397,9 @@ class ModuleManager {
SmallVector<Module*, 2> Chain;
/// \brief All loaded modules, indexed by name.
- llvm::StringMap<Module*> Modules;
+ llvm::DenseMap<const FileEntry *, Module *> Modules;
+
+ FileManager FileMgr;
public:
typedef SmallVector<Module*, 2>::iterator ModuleIterator;
@@ -403,6 +407,7 @@ public:
typedef SmallVector<Module*, 2>::reverse_iterator ModuleReverseIterator;
typedef std::pair<uint32_t, StringRef> ModuleOffset;
+ ModuleManager(const FileSystemOptions &FSO);
~ModuleManager();
/// \brief Forward iterator to traverse all loaded modules
@@ -436,7 +441,7 @@ public:
Module &operator[](unsigned Index) const { return *Chain[Index]; }
/// \brief Returns the module associated with the given name
- Module *lookup(StringRef Name) { return Modules.lookup(Name); }
+ Module *lookup(StringRef Name);
/// \brief Number of modules loaded
unsigned size() const { return Chain.size(); }