aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CompilerDriver/Main.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-22 20:22:31 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-22 20:22:31 +0000
commitcd8bdd025fe37fc395801cb41a50c60d7fab63b6 (patch)
tree5802cd70238acbfb06af5a8d9c96a8edc2ed787a /llvm/lib/CompilerDriver/Main.cpp
parent5fa3813329d93ed4f1aa2e74dbb54b2bd650d034 (diff)
downloadllvm-cd8bdd025fe37fc395801cb41a50c60d7fab63b6.zip
llvm-cd8bdd025fe37fc395801cb41a50c60d7fab63b6.tar.gz
llvm-cd8bdd025fe37fc395801cb41a50c60d7fab63b6.tar.bz2
Improve performance during cursor traversal when a region of interest
is present. Rather than using clang_getCursorExtent(), which requires us to lex the token at the ending position to determine its length. Then, we'd be comparing [a, b) source ranges that cover the characters in the range rather than the normal behavior for Clang's source ranges, which covers the tokens in the range. However, relexing causes us to read the source file (which may come from a precompiled header), which is rather unfortunate and affects performance. In the new scheme, we only use Clang-style source ranges that cover the tokens in the range. At the entry points where this matters (clang_annotateTokens, clang_getCursor), we make sure to move source locations to the start of the token. Addresses most of <rdar://problem/8049381>. llvm-svn: 109134
Diffstat (limited to 'llvm/lib/CompilerDriver/Main.cpp')
0 files changed, 0 insertions, 0 deletions