summaryrefslogtreecommitdiffstats
path: root/clang/Driver/ASTStreamers.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename ASTStreamers.* -> ASTConsumers.*Chris Lattner2007-10-071-356/+0
| | | | llvm-svn: 42718
* add a missing ;Chris Lattner2007-10-061-1/+1
| | | | llvm-svn: 42704
* stub out some printing of objc decls.Chris Lattner2007-10-061-2/+25
| | | | llvm-svn: 42703
* Migrated LiveVariables and UninitializedVariables to now use theTed Kremenek2007-10-011-1/+1
| | | | | | tracked BlkExpr information now maintained by the CFG class. llvm-svn: 42498
* Further refactored DataflowSolver. Now most code for the solver is sharedTed Kremenek2007-09-251-2/+1
| | | | | | | | | | | | | | | | | | | between forward and backward analyses, with trait classes being used to implement the key differences in operations/functionality. Converted the LiveVariables analysis to use the generic DataflowSolver. This, along with removing some extra functionality that was not needed, reduced the code for LiveVariables by over half. Modified Driver code to handle the updated interface to LiveVariables. Modified the DeadStores checker to handle the update interface to LiveVariables. Updated DataflowValues (generic ADT to store dataflow values) to also store values for blocks. This is used by DeadStores. Updated some comments. llvm-svn: 42293
* Added support to clang driver to view ASTs using GraphViz. ThisTed Kremenek2007-09-191-0/+25
| | | | | | functionality is still preliminary. llvm-svn: 42152
* UninitialuzedValues now only tracks BlockVarDecls; obviating false positives ↵Ted Kremenek2007-09-171-1/+24
| | | | | | | | with globals and function parameters. llvm-svn: 42055
* Removed check for NULL CFG. Bad CFGs will fire an assertion failureTed Kremenek2007-09-171-5/+3
| | | | | | in the CFG builder logic. llvm-svn: 42033
* switch the llvm emitter to ASTConsumer interface.Chris Lattner2007-09-161-0/+54
| | | | llvm-svn: 42013
* switch the various CFG-based stuff over to using ASTConsumer interface,Chris Lattner2007-09-151-58/+45
| | | | | | | this eliminates their dependence on the preprocessor and eliminates some duplicated code. llvm-svn: 41993
* convert ast printer and dumper ocver to ASTConsumer interface,Chris Lattner2007-09-151-54/+45
| | | | | | genericizing them and eliminating boilerplate code. llvm-svn: 41992
* add a new ASTConsumer consumer to simplify stuff in the driver.Chris Lattner2007-09-151-26/+0
| | | | | | Switch -parse-ast over to it. llvm-svn: 41991
* Phase 2 of making the Decl class more lightweight...Steve Naroff2007-09-131-4/+4
| | | | | | | | Move Identifier/Loc instance variables (and associated getters/setters) down from Decl to ScopedDecl/FieldDecl. Objc AST's can now inherit from Decl without getting instance variables and types that are C specific. For now, I am keeping NextDeclarator, since I believe it may be useful to ObjC. If not, it can be moved later. llvm-svn: 41934
* make the sourcemgr available through ASTContext.Chris Lattner2007-09-131-4/+8
| | | | llvm-svn: 41906
* Some small tweaks to the recent Objc support...Steve Naroff2007-09-101-0/+8
| | | | llvm-svn: 41803
* Fixed LiveVariables to no longer track the liveness of function pointersTed Kremenek2007-09-101-1/+2
| | | | | | | | | that refer to direct function calls. Modified interface of LiveVariables to only track liveness of VarDecls. This cleans up a bunch of edge cases, and removed the bug just mentioned. llvm-svn: 41797
* -check-dead-stores now no longer prints out the function declarationsTed Kremenek2007-09-071-0/+1
| | | | | | | | for each function. This was the behavior prior to the following patch: http://llvm.org/viewvc/llvm-project?view=rev&revision=41779 llvm-svn: 41780
* Refactored driver options that perform analyses/work over CFGs to useTed Kremenek2007-09-071-52/+81
| | | | | | | | | | | | "CFGVisitor", which now handles all the boilerplate for iterating over the function definitions in a translation unit and building the CFGs. This logic was previously replicated for each driver option that used CFGs. The options -dump-cfg, -view-cfg, -check-dead-stores, and -dump-live-variables now use this refactored code. llvm-svn: 41779
* Added "Dead Stores", a flow-sensitive checker that checks for storesTed Kremenek2007-09-061-0/+27
| | | | | | | | | | to variables that are no longer live. This analysis is built on top of CFGs and the LiveVariables analysis. changes to driver: added driver option "-check-dead-stores" to run the analysis llvm-svn: 41754
* LiveVariables:Ted Kremenek2007-09-061-1/+1
| | | | | | | | | | | | | | - Finished 99% of analysis logic. Probably a few bugs. - Added querying functions to query liveness. - Added better pretty printing of liveness. - Added better bookkeeping of per-variable liveness information. - Added LiveVariablesAuditor interface, which allows "lazy" querying of intra-basic block liveness information. Driver: - Minor cleanups involved in dumping liveness information. llvm-svn: 41753
* Added an early implementation of Live-Variables analysis built onTed Kremenek2007-09-061-0/+25
| | | | | | | | | | source-level CFGs. This code may change significantly in the near future as we explore different means to implement dataflow analyses. Added a driver option, -dump-live-variables, to view the output of live variable analysis. This output is very ALPHA; it will be improved shortly. llvm-svn: 41737
* Allow a SourceManager to optionally be passed into Stmt::dumpChris Lattner2007-08-301-1/+1
| | | | llvm-svn: 41588
* Added GraphTraits to source-level CFGs (CFG and CFGBlock) to allowTed Kremenek2007-08-291-3/+6
| | | | | | | | | | | | | | | | | | | | (LLVM-provided) graph algorithms such as DFS and graph visualization to work effortless on source-level CFGs. Further cleanup on pretty printing of CFGs. CFGBlock::dump and CFGBlock::print now take the parent CFG as an argument. This allows CFGBlocks to print their own appropriate label indicating whether or not they are the Entry/Exit/IndirectGotoBlock without the CFG::print routine doing it instead. Added Graphviz visualization for CFGs: CFG::viewCFG. This employs the GraphTraits just implemented. Added "-view-cfg" mode the to clang driver. This is identical to "-dump-cfg" except that it calls Graphviz to visualize the CFGs instead of dumping them to the terminal. llvm-svn: 41580
* Make parse-ast-print print the storage class and inline Chris Lattner2007-08-261-1/+13
| | | | | | specifier of functions. llvm-svn: 41416
* Renamed "CFG::BuildCFG" to "CFG::buildCFG" to have more consistent ↵Ted Kremenek2007-08-231-1/+1
| | | | | | | | | | | | | | capitalization. Added explicit "Exit" CFGBlock pointer to the source-level CFG. Changed the construction of blocks with "return" statements to have the return statement appear both as a statement in the list of statements for a CFGBlock as well as appear as a control-flow terminator. Also removed the implicit linearization of "return" so that the return value and the return statement did not appear as separate statements in the block. llvm-svn: 41323
* Added CFG infrastructure (CFG.cpp and CFG.h) for clang ASTs.Ted Kremenek2007-08-211-0/+27
| | | | | | | | | | | | Added builder code to translate ASTs to CFGs. This currently supports if, return, and non-control flow statements. Added pretty-printer to debug CFGs. Added a "-dump-cfg" option to the clang driver to dump CFGs for code sent through the frontend. llvm-svn: 41252
* add a new AST dumper interface (E->dump()). This dumps outChris Lattner2007-08-081-9/+45
| | | | | | | | | | | | | | | | | | | | | | | | | the AST in a structural, non-pretty, form useful for understanding the AST. It isn't quite done yet, but is already somewhat useful. For this example: int test(short X, long long Y) { return X < ((100)); } we get (with -parse-ast-dump): int test(short X, long long Y) (CompoundStmt 0x2905ce0 (ReturnStmt 0x2905cd0 (BinaryOperator 0x2905cb0 '<' (ImplicitCastExpr 0x2905ca0 (DeclRefExpr 0x2905c20 Decl='X' 0x2905bb0)) (ParenExpr 0x2905c80 (ParenExpr 0x2905c60 (IntegerLiteral 0x2905c40 100)))))) llvm-svn: 40954
* Submitted by: Bill WendlingBill Wendling2007-06-231-0/+109
- Separate out the AST streamers from the clang.cpp file into their very own special files. llvm-svn: 39676
OpenPOWER on IntegriCloud