summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineSink.cpp
diff options
context:
space:
mode:
authorCraig Silverstein <csilvers2000@yahoo.com>2010-07-28 15:54:33 +0000
committerCraig Silverstein <csilvers2000@yahoo.com>2010-07-28 15:54:33 +0000
commit118c61c23e74f2f452d7c8d1fbf1f938e8207787 (patch)
tree577a216e8db63c0845eb32d31e4d5618ac332f47 /llvm/lib/CodeGen/MachineSink.cpp
parentf0084e1333a11fc9e0e90718515e5777a8552c26 (diff)
downloadbcm5719-llvm-118c61c23e74f2f452d7c8d1fbf1f938e8207787.tar.gz
bcm5719-llvm-118c61c23e74f2f452d7c8d1fbf1f938e8207787.zip
Add proper callbacks for DeclStmt -- we weren't recursing on
the decls. This was just an oversight before; one we didn't catch because lots of information in a DeclStmt was also being traversed (redundantly) elsewhere. Once DeclStmt was cleaned up, I could clean up some of the redundant traversals found elswhere as well -- in particular, traversing the declarations inside a function as part of the function callback (instead of as part of the CompoundExpr callback that constitutes the body of the function). The old way was really weird, and led to some parts of local variable declarations (but not all) being visited twice. That is now resolved. I also was able to simplify the traversers for IfStmt/WhileStmt/etc, which used to have redundant calls to work around the fact DeclStmt wasn't working properly. While in the area, I fixed up a few more recursion-ordering issues. I try to hold to the principle that RecursiveASTVisitor visits objects in the source code in the same order they're typed. So the return-type of a variable comes before the variable-name. This still isn't perfect, but we're closer to that. Reviewed by chandlerc and wan. llvm-svn: 109590
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud