Skip to content
  • Steve Naroff's avatar
    Extend clang_getCursor() to take a 'relativeDecl' argument (so speed up... · 20bad0b7
    Steve Naroff authored
    Extend clang_getCursor() to take a 'relativeDecl' argument (so speed up searching). Without a 'relativeDecl', the algorithm is n-squared. For example, running the following command on 'Large.m' takes hours without a 'relatvieDecl'. 
    
    snaroff% time ../../Debug/bin/c-index-test Large.ast all > Large.out
    snaroff% cat Large.m
    #import <Cocoa/Cocoa.h>
    #import <QuickTime/QuickTime.h>
    #import <OpenGL/OpenGL.h>
    
    With a 'relativeDecl', it takes <30 seconds:-)
    
    llvm-svn: 84760
    20bad0b7
Loading