diff options
Diffstat (limited to 'include/clang/Frontend/ASTUnit.h')
-rw-r--r-- | include/clang/Frontend/ASTUnit.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h index 02c57d7..43d77f0 100644 --- a/include/clang/Frontend/ASTUnit.h +++ b/include/clang/Frontend/ASTUnit.h @@ -25,7 +25,6 @@ #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" @@ -44,6 +43,7 @@ namespace llvm { } namespace clang { +class Sema; class ASTContext; class ASTReader; class CodeCompleteConsumer; @@ -75,6 +75,7 @@ private: IntrusiveRefCntPtr<TargetOptions> TargetOpts; IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts; ASTReader *Reader; + bool HadModuleLoaderFatalFailure; struct ASTWriterData; OwningPtr<ASTWriterData> WriterData; @@ -456,7 +457,7 @@ public: void setASTContext(ASTContext *ctx) { Ctx = ctx; } void setPreprocessor(Preprocessor *pp); - bool hasSema() const { return TheSema; } + bool hasSema() const { return TheSema.isValid(); } Sema &getSema() const { assert(TheSema && "ASTUnit does not have a Sema object!"); return *TheSema; @@ -471,13 +472,14 @@ public: return OriginalSourceFile; } + ASTMutationListener *getASTMutationListener(); ASTDeserializationListener *getDeserializationListener(); /// \brief Add a temporary file that the ASTUnit depends on. /// /// This file will be erased when the ASTUnit is destroyed. - void addTemporaryFile(const llvm::sys::Path &TempFile); - + void addTemporaryFile(StringRef TempFile); + bool getOnlyLocalDecls() const { return OnlyLocalDecls; } bool getOwnsRemappedFileBuffers() const { return OwnsRemappedFileBuffers; } @@ -697,10 +699,10 @@ public: /// lifetime is expected to extend past that of the returned ASTUnit. /// /// \param Action - The ASTFrontendAction to invoke. Its ownership is not - /// transfered. + /// transferred. /// /// \param Unit - optionally an already created ASTUnit. Its ownership is not - /// transfered. + /// transferred. /// /// \param Persistent - if true the returned ASTUnit will be complete. /// false means the caller is only interested in getting info through the |