diff options
author | Steve Naroff <snaroff@apple.com> | 2009-10-19 14:34:22 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-10-19 14:34:22 +0000 |
commit | 36c4464ba6cfc2a63dc67c493ef2f5ab2aea09cc (patch) | |
tree | 1c632799acfc9070271462b1425237f4820957a8 /tools/index-test/index-test.cpp | |
parent | bade7de59dff22fdb6a53291366da1973a919f10 (diff) |
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 <rdar://problem/7303432>).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84499 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/index-test/index-test.cpp')
-rw-r--r-- | tools/index-test/index-test.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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<ASTUnit> 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 " |