Home | History | Annotate | Download | only in Frontend

Lines Matching refs:ASTUnit

1 //===--- ASTUnit.cpp - ASTUnit utility ------------------------------------===//
10 // ASTUnit Implementation.
14 #include "clang/Frontend/ASTUnit.h"
86 /// \brief Temporary files that should be removed when the ASTUnit is
108 typedef llvm::DenseMap<const ASTUnit *, OnDiskData *> OnDiskDataMap;
120 // Use the mutex because there can be an alive thread destroying an ASTUnit.
130 static OnDiskData &getOnDiskData(const ASTUnit *AU) {
141 static void erasePreambleFile(const ASTUnit *AU) {
145 static void removeOnDiskEntry(const ASTUnit *AU) {
158 static void setPreambleFile(const ASTUnit *AU, StringRef preambleFile) {
162 static const std::string &getPreambleFile(const ASTUnit *AU) {
184 struct ASTUnit::ASTWriterData {
192 void ASTUnit::clearFileLevelDecls() {
199 void ASTUnit::CleanTemporaryFiles() {
203 void ASTUnit::addTemporaryFile(const llvm::sys::Path &TempFile) {
213 /// \brief Tracks the number of ASTUnit objects that are currently active.
218 ASTUnit::ASTUnit(bool _MainFileIsAST)
238 ASTUnit::~ASTUnit() {
269 void ASTUnit::setPreprocessor(Preprocessor *pp) { PP = pp; }
345 void ASTUnit::CacheCodeCompletionResults() {
493 void ASTUnit::ClearCachedCompletionResults() {
641 ASTDeserializationListener *ASTUnit::getDeserializationListener() {
647 llvm::MemoryBuffer *ASTUnit::getBufferForFile(StringRef Filename,
653 /// \brief Configure the diagnostics object for use with ASTUnit.
654 void ASTUnit::ConfigureDiags(IntrusiveRefCntPtr<DiagnosticsEngine> &Diags,
656 ASTUnit &AST, bool CaptureDiagnostics) {
672 ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
681 OwningPtr<ASTUnit> AST(new ASTUnit(true));
684 llvm::CrashRecoveryContextCleanupRegistrar<ASTUnit>
823 // by the ASTUnit cleanup.
880 ASTUnit &Unit;
884 TopLevelDeclTrackerConsumer(ASTUnit &_Unit, unsigned &Hash)
936 ASTUnit &Unit;
947 TopLevelDeclTrackerAction(ASTUnit &_Unit) : Unit(_Unit) {}
956 ASTUnit &Unit;
961 PrecompilePreambleConsumer(ASTUnit &Unit, const Preprocessor &PP,
998 ASTUnit &Unit;
1001 explicit PrecompilePreambleAction(ASTUnit &Unit) : Unit(Unit) {}
1060 /// \returns True if a failure occurred that causes the ASTUnit not to
1062 bool ASTUnit::Parse(llvm::MemoryBuffer *OverrideMainBuffer) {
1194 // Keep the ownership of the data in the ASTUnit because the client may
1241 ASTUnit::ComputePreamble(CompilerInvocation &Invocation,
1347 llvm::MemoryBuffer *ASTUnit::getMainBufferWithPrecompiledPreamble(
1669 void ASTUnit::RealizeTopLevelDeclsFromPreamble() {
1684 void ASTUnit::transferASTDataFromCompilerInstance(CompilerInstance &CI) {
1696 StringRef ASTUnit::getMainFileName() const {
1714 StringRef ASTUnit::getASTFileName() const {
1723 ASTUnit *ASTUnit::create(CompilerInvocation *CI,
1727 OwningPtr<ASTUnit> AST;
1728 AST.reset(new ASTUnit(false));
1741 ASTUnit *ASTUnit::LoadFromCompilerInvocationAction(CompilerInvocation *CI,
1744 ASTUnit *Unit,
1753 OwningPtr<ASTUnit> *ErrAST) {
1756 OwningPtr<ASTUnit> OwnAST;
1757 ASTUnit *AST = Unit;
1778 llvm::CrashRecoveryContextCleanupRegistrar<ASTUnit>
1883 bool ASTUnit::LoadFromCompilerInvocation(bool PrecompilePreamble) {
1909 ASTUnit *ASTUnit::LoadFromCompilerInvocation(CompilerInvocation *CI,
1919 OwningPtr<ASTUnit> AST;
1920 AST.reset(new ASTUnit(false));
1935 llvm::CrashRecoveryContextCleanupRegistrar<ASTUnit>
1944 ASTUnit *ASTUnit::LoadFromCommandLine(const char **ArgBegin,
1961 OwningPtr<ASTUnit> *ErrAST) {
2005 OwningPtr<ASTUnit> AST;
2006 AST.reset(new ASTUnit(false));
2027 llvm::CrashRecoveryContextCleanupRegistrar<ASTUnit>
2032 // ASTUnit.
2043 bool ASTUnit::Reparse(RemappedFile *RemappedFiles, unsigned NumRemappedFiles) {
2109 /// results from an ASTUnit with the code-completion results provided to it,
2113 ASTUnit &AST;
2117 AugmentedCodeCompleteConsumer(ASTUnit &AST, CodeCompleteConsumer &Next,
2264 for (ASTUnit::cached_completion_iterator
2343 void ASTUnit::CodeComplete(StringRef File, unsigned Line, unsigned Column,
2492 bool ASTUnit::Save(StringRef File) {
2537 bool ASTUnit::serialize(raw_ostream &OS) {
2559 void ASTUnit::TranslateStoredDiagnostics(
2623 void ASTUnit::addFileLevelDecl(Decl *D) {
2664 void ASTUnit::findFileRegionDecls(FileID File, unsigned Offset, unsigned Length,
2707 SourceLocation ASTUnit::getLocation(const FileEntry *File,
2714 SourceLocation ASTUnit::getLocation(const FileEntry *File,
2724 SourceLocation ASTUnit::mapLocationFromPreamble(SourceLocation Loc) {
2745 SourceLocation ASTUnit::mapLocationToPreamble(SourceLocation Loc) {
2763 bool ASTUnit::isInPreambleFileID(SourceLocation Loc) {
2774 bool ASTUnit::isInMainFileID(SourceLocation Loc) {
2785 SourceLocation ASTUnit::getEndOfPreambleFileID() {
2796 SourceLocation ASTUnit::getStartOfMainFileID() {
2808 ASTUnit::getLocalPreprocessingEntities() const {
2822 bool ASTUnit::visitLocalTopLevelDecls(void *context, DeclVisitorFn Fn) {
2836 for (ASTUnit::top_level_iterator TL = top_level_begin(),
2870 const FileEntry *ASTUnit::getPCHFile() {
2882 bool ASTUnit::isModuleFile() {
2886 void ASTUnit::PreambleData::countLines() const {
2901 ASTUnit::ConcurrencyState::ConcurrencyState() {
2905 ASTUnit::ConcurrencyState::~ConcurrencyState() {
2909 void ASTUnit::ConcurrencyState::start() {
2911 assert(acquired && "Concurrent access to ASTUnit!");
2914 void ASTUnit::ConcurrencyState::finish() {
2920 ASTUnit::ConcurrencyState::ConcurrencyState() {}
2921 ASTUnit::ConcurrencyState::~ConcurrencyState() {}
2922 void ASTUnit::ConcurrencyState::start() {}
2923 void ASTUnit::ConcurrencyState::finish() {}