]> granicus.if.org Git - clang/commit
[AST] Reimplement Stmt::getLoc{Start,End} to dispatch to subclass overloads.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 9 Mar 2012 15:39:19 +0000 (15:39 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 9 Mar 2012 15:39:19 +0000 (15:39 +0000)
commit90e25a8b2cc5d006e4ced052bcdb40c8af999456
treef72fde5cba924ec0f7f66f123b0b9d18f75a29d8
parent396ec676b7a39665fa3a3f86f8e0520f8d7e93a8
[AST] Reimplement Stmt::getLoc{Start,End} to dispatch to subclass overloads.
 - getSourceRange() can be very expensive, we should try to avoid it if at all possible.

In conjunction with the previous commit I measured a ~2% speedup on 403.gcc/combine.c and a 3% speedup on OmniGroupFrameworks/NSBezierPath-OAExtensions.m.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152411 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Stmt.h
lib/AST/Expr.cpp
lib/AST/Stmt.cpp