From 36c4464ba6cfc2a63dc67c493ef2f5ab2aea09cc Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Mon, 19 Oct 2009 14:34:22 +0000 Subject: Move Diagnostic/DiagClient/FileManager from Indexer => ASTUnit. Removing this shared data should enable clang_createTranslationUnit/clang_createTranslationUnitFromSourceFile to be run from multiple threads (related to ). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84499 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/index-test/index-test.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tools/index-test/index-test.cpp') diff --git a/tools/index-test/index-test.cpp b/tools/index-test/index-test.cpp index 103874c77d..fce48edf26 100644 --- a/tools/index-test/index-test.cpp +++ b/tools/index-test/index-test.cpp @@ -225,8 +225,7 @@ int main(int argc, char **argv) { std::string ErrMsg; llvm::OwningPtr AST; - AST.reset(ASTUnit::LoadFromPCHFile(InFile, Idxer.getDiagnostics(), - Idxer.getFileManager(), &ErrMsg)); + AST.reset(ASTUnit::LoadFromPCHFile(InFile, &ErrMsg)); if (!AST) { llvm::errs() << "[" << InFile << "] Error: " << ErrMsg << '\n'; return 1; @@ -244,7 +243,7 @@ int main(int argc, char **argv) { if (!PointAtLocation.empty()) { const std::string &Filename = PointAtLocation[0].FileName; - const FileEntry *File = Idxer.getFileManager().getFile(Filename); + const FileEntry *File = FirstAST->getFileManager().getFile(Filename); if (File == 0) { llvm::errs() << "File '" << Filename << "' does not exist\n"; return 1; @@ -253,7 +252,7 @@ int main(int argc, char **argv) { // Safety check. Using an out-of-date AST file will only lead to crashes // or incorrect results. // FIXME: Check all the source files that make up the AST file. - const FileEntry *ASTFile = Idxer.getFileManager().getFile(FirstFile); + const FileEntry *ASTFile = FirstAST->getFileManager().getFile(FirstFile); if (File->getModificationTime() > ASTFile->getModificationTime()) { llvm::errs() << "[" << FirstFile << "] Error: " << "Pointing at a source file which was modified after creating " -- cgit v1.2.3-18-g5258