llvm-project/clang/tools/c-index-test
Daniel Dunbar 1108966959 Switch clang_createTranslationUnitFromSourceFile to use ASTUnit::LoadFromCommandLine.
- This is much faster, as it avoids the overhead of dumping an AST file to disk and reloading it.
 - For debugging purposes, there is a clang_setUseExternalASTGeneration hook which can be used to disable this.

On the Sketch Cocoa app, the speedup is pretty nice, especially when using a PCH file while scanning the source:

Wall time to c-index-test all files (no PCH):
Old: 23.4221
New: 12.3884

Wall time to c-index-test all files (with a PCH, and "local" mode):
Old: 10.9233
New:  1.9038

llvm-svn: 90385
2009-12-03 01:54:28 +00:00
..
CMakeLists.txt Normalize CIndex/c-index-test/index-test link lines in the hopes it will fix 2009-12-02 21:47:55 +00:00
Makefile Normalize CIndex/c-index-test/index-test link lines in the hopes it will fix 2009-12-02 21:47:55 +00:00
c-index-test.c Switch clang_createTranslationUnitFromSourceFile to use ASTUnit::LoadFromCommandLine. 2009-12-03 01:54:28 +00:00