diff options
Diffstat (limited to 'include/clang/Frontend/ASTUnit.h')
-rw-r--r-- | include/clang/Frontend/ASTUnit.h | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h index 5e409bd..02c57d7 100644 --- a/include/clang/Frontend/ASTUnit.h +++ b/include/clang/Frontend/ASTUnit.h @@ -14,30 +14,30 @@ #ifndef LLVM_CLANG_FRONTEND_ASTUNIT_H #define LLVM_CLANG_FRONTEND_ASTUNIT_H -#include "clang/Serialization/ASTBitCodes.h" -#include "clang/Sema/Sema.h" -#include "clang/Sema/CodeCompleteConsumer.h" -#include "clang/Lex/ModuleLoader.h" -#include "clang/Lex/PreprocessingRecord.h" -#include "clang/Lex/HeaderSearchOptions.h" +#include "clang-c/Index.h" #include "clang/AST/ASTContext.h" -#include "clang/Basic/LangOptions.h" -#include "clang/Basic/SourceManager.h" #include "clang/Basic/FileManager.h" #include "clang/Basic/FileSystemOptions.h" +#include "clang/Basic/LangOptions.h" +#include "clang/Basic/SourceManager.h" #include "clang/Basic/TargetOptions.h" -#include "clang-c/Index.h" +#include "clang/Lex/HeaderSearchOptions.h" +#include "clang/Lex/ModuleLoader.h" +#include "clang/Lex/PreprocessingRecord.h" +#include "clang/Sema/CodeCompleteConsumer.h" +#include "clang/Sema/Sema.h" +#include "clang/Serialization/ASTBitCodes.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringMap.h" #include "llvm/Support/Path.h" +#include <cassert> #include <map> #include <string> -#include <vector> -#include <cassert> -#include <utility> #include <sys/types.h> +#include <utility> +#include <vector> namespace llvm { class MemoryBuffer; @@ -485,6 +485,9 @@ public: StringRef getMainFileName() const; + /// \brief If this ASTUnit came from an AST file, returns the filename for it. + StringRef getASTFileName() const; + typedef std::vector<Decl *>::iterator top_level_iterator; top_level_iterator top_level_begin() { @@ -830,12 +833,19 @@ public: /// \returns True if an error occurred, false otherwise. bool serialize(raw_ostream &OS); - virtual Module *loadModule(SourceLocation ImportLoc, ModuleIdPath Path, - Module::NameVisibilityKind Visibility, - bool IsInclusionDirective) { + virtual ModuleLoadResult loadModule(SourceLocation ImportLoc, + ModuleIdPath Path, + Module::NameVisibilityKind Visibility, + bool IsInclusionDirective) { // ASTUnit doesn't know how to load modules (not that this matters). - return 0; + return ModuleLoadResult(); } + + virtual void makeModuleVisible(Module *Mod, + Module::NameVisibilityKind Visibility, + SourceLocation ImportLoc, + bool Complain) { } + }; } // namespace clang |