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() {
196 void ASTUnit::CleanTemporaryFiles() {
200 void ASTUnit::addTemporaryFile(StringRef TempFile) {
210 /// \brief Tracks the number of ASTUnit objects that are currently active.
215 ASTUnit::ASTUnit(bool _MainFileIsAST)
234 ASTUnit::~ASTUnit() {
264 void ASTUnit::setPreprocessor(Preprocessor *pp) { PP = pp; }
340 void ASTUnit::CacheCodeCompletionResults() {
488 void ASTUnit::ClearCachedCompletionResults() {
629 ASTMutationListener *ASTUnit::getASTMutationListener() {
635 ASTDeserializationListener *ASTUnit::getDeserializationListener() {
641 llvm::MemoryBuffer *ASTUnit::getBufferForFile(StringRef Filename,
647 /// \brief Configure the diagnostics object for use with ASTUnit.
648 void ASTUnit::ConfigureDiags(IntrusiveRefCntPtr<DiagnosticsEngine> &Diags,
650 ASTUnit &AST, bool CaptureDiagnostics) {
665 ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
673 std::unique_ptr<ASTUnit> AST(new ASTUnit(true));
676 llvm::CrashRecoveryContextCleanupRegistrar<ASTUnit>
833 ASTUnit &Unit;
837 TopLevelDeclTrackerConsumer(ASTUnit &_Unit, unsigned &Hash)
892 ASTUnit &Unit;
903 TopLevelDeclTrackerAction(ASTUnit &_Unit) : Unit(_Unit) {}
912 ASTUnit &Unit;
916 explicit PrecompilePreambleAction(ASTUnit &Unit)
931 ASTUnit &Unit;
937 PrecompilePreambleConsumer(ASTUnit &Unit, PrecompilePreambleAction *Action,
1032 /// \returns True if a failure occurred that causes the ASTUnit not to
1034 bool ASTUnit::Parse(llvm::MemoryBuffer *OverrideMainBuffer) {
1170 // Keep the ownership of the data in the ASTUnit because the client may
1198 ASTUnit::ComputePreamble(CompilerInvocation &Invocation,
1264 ASTUnit::PreambleFileHash
1265 ASTUnit::PreambleFileHash::createForFile(off_t Size, time_t ModTime) {
1273 ASTUnit::PreambleFileHash ASTUnit::PreambleFileHash::createForMemoryBuffer(
1287 bool operator==(const ASTUnit::PreambleFileHash &LHS,
1288 const ASTUnit::PreambleFileHash &RHS) {
1306 ASTUnit::StandaloneFixIt &OutFix) {
1316 ASTUnit::StandaloneDiagnostic &OutDiag) {
1335 ASTUnit::StandaloneFixIt Fix;
1361 llvm::MemoryBuffer *ASTUnit
1671 void ASTUnit::RealizeTopLevelDeclsFromPreamble() {
1686 void ASTUnit::transferASTDataFromCompilerInstance(CompilerInstance &CI) {
1705 StringRef ASTUnit::getMainFileName() const {
1723 StringRef ASTUnit::getASTFileName() const {
1732 ASTUnit *ASTUnit::create(CompilerInvocation *CI,
1736 std::unique_ptr<ASTUnit> AST;
1737 AST.reset(new ASTUnit(false));
1754 ASTUnit *ASTUnit::LoadFromCompilerInvocationAction(
1756 ASTFrontendAction *Action, ASTUnit *Unit, bool Persistent,
1760 std::unique_ptr<ASTUnit> *ErrAST) {
1763 std::unique_ptr<ASTUnit> OwnAST;
1764 ASTUnit *AST = Unit;
1787 llvm::CrashRecoveryContextCleanupRegistrar<ASTUnit>
1892 bool ASTUnit::LoadFromCompilerInvocation(bool PrecompilePreamble) {
1918 std::unique_ptr<ASTUnit> ASTUnit::LoadFromCompilerInvocation(
1924 std::unique_ptr<ASTUnit> AST(new ASTUnit(false));
1943 llvm::CrashRecoveryContextCleanupRegistrar<ASTUnit>
1954 ASTUnit *ASTUnit::LoadFromCommandLine(
1963 std::unique_ptr<ASTUnit> *ErrAST) {
2001 std::unique_ptr<ASTUnit> AST;
2002 AST.reset(new ASTUnit(false));
2027 llvm::CrashRecoveryContextCleanupRegistrar<ASTUnit>
2032 // ASTUnit.
2043 bool ASTUnit::Reparse(ArrayRef<RemappedFile> RemappedFiles) {
2097 /// results from an ASTUnit with the code-completion results provided to it,
2101 ASTUnit &AST;
2105 AugmentedCodeCompleteConsumer(ASTUnit &AST, CodeCompleteConsumer &Next,
2251 for (ASTUnit::cached_completion_iterator
2330 void ASTUnit::CodeComplete(StringRef File, unsigned Line, unsigned Column,
2475 bool ASTUnit::Save(StringRef File) {
2521 bool ASTUnit::serialize(raw_ostream &OS) {
2536 void ASTUnit::TranslateStoredDiagnostics(
2591 void ASTUnit::addFileLevelDecl(Decl *D) {
2632 void ASTUnit::findFileRegionDecls(FileID File, unsigned Offset, unsigned Length,
2675 SourceLocation ASTUnit::getLocation(const FileEntry *File,
2682 SourceLocation ASTUnit::getLocation(const FileEntry *File,
2692 SourceLocation ASTUnit::mapLocationFromPreamble(SourceLocation Loc) {
2713 SourceLocation ASTUnit::mapLocationToPreamble(SourceLocation Loc) {
2731 bool ASTUnit::isInPreambleFileID(SourceLocation Loc) {
2742 bool ASTUnit::isInMainFileID(SourceLocation Loc) {
2753 SourceLocation ASTUnit::getEndOfPreambleFileID() {
2764 SourceLocation ASTUnit::getStartOfMainFileID() {
2776 ASTUnit::getLocalPreprocessingEntities() const {
2790 bool ASTUnit::visitLocalTopLevelDecls(void *context, DeclVisitorFn Fn) {
2804 for (ASTUnit::top_level_iterator TL = top_level_begin(),
2838 const FileEntry *ASTUnit::getPCHFile() {
2850 bool ASTUnit::isModuleFile() {
2854 void ASTUnit::PreambleData::countLines() const {
2869 ASTUnit::ConcurrencyState::ConcurrencyState() {
2873 ASTUnit::ConcurrencyState::~ConcurrencyState() {
2877 void ASTUnit::ConcurrencyState::start() {
2879 assert(acquired && "Concurrent access to ASTUnit!");
2882 void ASTUnit::ConcurrencyState::finish() {
2888 ASTUnit::ConcurrencyState::ConcurrencyState() { Mutex = 0; }
2889 ASTUnit::ConcurrencyState::~ConcurrencyState() {}
2890 void ASTUnit::ConcurrencyState::start() {}
2891 void ASTUnit::ConcurrencyState::finish() {}