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 | 505fb84ed9e6eca26a0d8c161c71cd51ac0eb3da (patch) | |
tree | 7b44672cc2448b0857a31e224cac38db61979409 /clang/tools/index-test/index-test.cpp | |
parent | 2f78a6f368e9e3eeda2b368ed0b8c0855a5df377 (diff) | |
download | bcm5719-llvm-505fb84ed9e6eca26a0d8c161c71cd51ac0eb3da.tar.gz bcm5719-llvm-505fb84ed9e6eca26a0d8c161c71cd51ac0eb3da.zip |
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>).
llvm-svn: 84499
Diffstat (limited to 'clang/tools/index-test/index-test.cpp')
-rw-r--r-- | clang/tools/index-test/index-test.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/tools/index-test/index-test.cpp b/clang/tools/index-test/index-test.cpp index 103874c77d7..fce48edf26e 100644 --- a/clang/tools/index-test/index-test.cpp +++ b/clang/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 " |