Home | History | Annotate | Download | only in Frontend

Lines Matching defs: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 *,
121 // 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) {
157 static void setPreambleFile(const ASTUnit *AU, StringRef preambleFile) {
161 static const std::string &getPreambleFile(const ASTUnit *AU) {
183 struct ASTUnit::ASTWriterData {
191 void ASTUnit::clearFileLevelDecls() {
195 void ASTUnit::CleanTemporaryFiles() {
199 void ASTUnit::addTemporaryFile(StringRef TempFile) {
209 /// \brief Tracks the number of ASTUnit objects that are currently active.
214 ASTUnit::ASTUnit(bool _MainFileIsAST)
233 ASTUnit::~ASTUnit() {
260 void ASTUnit::setPreprocessor(Preprocessor *pp) { PP = pp; }
336 void ASTUnit::CacheCodeCompletionResults() {
478 void ASTUnit::ClearCachedCompletionResults() {
619 ASTMutationListener *ASTUnit::getASTMutationListener() {
625 ASTDeserializationListener *ASTUnit::getDeserializationListener() {
632 ASTUnit::getBufferForFile(StringRef Filename, std::string *ErrorStr) {
642 /// \brief Configure the diagnostics object for use with ASTUnit.
643 void ASTUnit::ConfigureDiags(IntrusiveRefCntPtr<DiagnosticsEngine> Diags,
644 ASTUnit &AST, bool CaptureDiagnostics) {
650 std::unique_ptr<ASTUnit> ASTUnit::LoadFromASTFile(
655 std::unique_ptr<ASTUnit> AST(new ASTUnit(true));
658 llvm::CrashRecoveryContextCleanupRegistrar<ASTUnit>
816 ASTUnit &Unit;
820 TopLevelDeclTrackerConsumer(ASTUnit &_Unit, unsigned &Hash)
875 ASTUnit &Unit;
887 TopLevelDeclTrackerAction(ASTUnit &_Unit) : Unit(_Unit) {}
896 ASTUnit &Unit;
900 explicit PrecompilePreambleAction(ASTUnit &Unit)
915 ASTUnit &Unit;
921 PrecompilePreambleConsumer(ASTUnit &Unit, PrecompilePreambleAction *Action,
1016 /// \returns True if a failure occurred that causes the ASTUnit not to
1018 bool ASTUnit::Parse(std::unique_ptr<llvm::MemoryBuffer> OverrideMainBuffer) {
1145 // Keep the ownership of the data in the ASTUnit because the client may
1172 ASTUnit::ComputedPreamble
1173 ASTUnit::ComputePreamble(CompilerInvocation &Invocation, unsigned MaxLines) {
1229 ASTUnit::PreambleFileHash
1230 ASTUnit::PreambleFileHash::createForFile(off_t Size, time_t ModTime) {
1238 ASTUnit::PreambleFileHash ASTUnit::PreambleFileHash::createForMemoryBuffer(
1252 bool operator==(const ASTUnit::PreambleFileHash &LHS,
1253 const ASTUnit::PreambleFileHash &RHS) {
1268 static ASTUnit::StandaloneFixIt makeStandaloneFixIt(const SourceManager &SM,
1271 ASTUnit::StandaloneFixIt OutFix;
1280 static ASTUnit::StandaloneDiagnostic
1283 ASTUnit::StandaloneDiagnostic OutDiag;
1325 ASTUnit::getMainBufferWithPrecompiledPreamble(
1622 void ASTUnit::RealizeTopLevelDeclsFromPreamble() {
1636 void ASTUnit::transferASTDataFromCompilerInstance(CompilerInstance &CI) {
1655 StringRef ASTUnit::getMainFileName() const {
1673 StringRef ASTUnit::getASTFileName() const {
1682 ASTUnit *ASTUnit::create(CompilerInvocation *CI,
1686 std::unique_ptr<ASTUnit> AST;
1687 AST.reset(new ASTUnit(false));
1704 ASTUnit *ASTUnit::LoadFromCompilerInvocationAction(
1706 ASTFrontendAction *Action, ASTUnit *Unit, bool Persistent,
1710 std::unique_ptr<ASTUnit> *ErrAST) {
1713 std::unique_ptr<ASTUnit> OwnAST;
1714 ASTUnit *AST = Unit;
1737 llvm::CrashRecoveryContextCleanupRegistrar<ASTUnit>
1844 bool ASTUnit::LoadFromCompilerInvocation(bool PrecompilePreamble) {
1869 std::unique_ptr<ASTUnit> ASTUnit::LoadFromCompilerInvocation(
1875 std::unique_ptr<ASTUnit> AST(new ASTUnit(false));
1894 llvm::CrashRecoveryContextCleanupRegistrar<ASTUnit>
1905 ASTUnit *ASTUnit::LoadFromCommandLine(
1914 std::unique_ptr<ASTUnit> *ErrAST) {
1948 std::unique_ptr<ASTUnit> AST;
1949 AST.reset(new ASTUnit(false));
1975 llvm::CrashRecoveryContextCleanupRegistrar<ASTUnit>
1980 // ASTUnit.
1991 bool ASTUnit::Reparse(ArrayRef<RemappedFile> RemappedFiles) {
2045 /// results from an ASTUnit with the code-completion results provided to it,
2049 ASTUnit &AST;
2053 AugmentedCodeCompleteConsumer(ASTUnit &AST, CodeCompleteConsumer &Next,
2199 for (ASTUnit::cached_completion_iterator
2278 void ASTUnit::CodeComplete(StringRef File, unsigned Line, unsigned Column,
2426 bool ASTUnit::Save(StringRef File) {
2472 bool ASTUnit::serialize(raw_ostream &OS) {
2487 void ASTUnit::TranslateStoredDiagnostics(
2538 void ASTUnit::addFileLevelDecl(Decl *D) {
2579 void ASTUnit::findFileRegionDecls(FileID File, unsigned Offset, unsigned Length,
2622 SourceLocation ASTUnit::getLocation(const FileEntry *File,
2629 SourceLocation ASTUnit::getLocation(const FileEntry *File,
2639 SourceLocation ASTUnit::mapLocationFromPreamble(SourceLocation Loc) {
2660 SourceLocation ASTUnit::mapLocationToPreamble(SourceLocation Loc) {
2678 bool ASTUnit::isInPreambleFileID(SourceLocation Loc) {
2689 bool ASTUnit::isInMainFileID(SourceLocation Loc) {
2700 SourceLocation ASTUnit::getEndOfPreambleFileID() {
2711 SourceLocation ASTUnit::getStartOfMainFileID() {
2723 ASTUnit::getLocalPreprocessingEntities() const {
2737 bool ASTUnit::visitLocalTopLevelDecls(void *context, DeclVisitorFn Fn) {
2749 for (ASTUnit::top_level_iterator TL = top_level_begin(),
2784 const FileEntry *ASTUnit::getPCHFile() {
2796 bool ASTUnit::isModuleFile() {
2800 void ASTUnit::PreambleData::countLines() const {
2812 ASTUnit::ConcurrencyState::ConcurrencyState() {
2816 ASTUnit::ConcurrencyState::~ConcurrencyState() {
2820 void ASTUnit::ConcurrencyState::start() {
2822 assert(acquired && "Concurrent access to ASTUnit!");
2825 void ASTUnit::ConcurrencyState::finish() {
2831 ASTUnit::ConcurrencyState::ConcurrencyState() { Mutex = 0; }
2832 ASTUnit::ConcurrencyState::~ConcurrencyState() {}
2833 void ASTUnit::ConcurrencyState::start() {}
2834 void ASTUnit::ConcurrencyState::finish() {}