summaryrefslogtreecommitdiffstats
path: root/clang/Driver/ASTConsumers.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Running -grsimple now emits diagnostics about the time spent analyzing each ↵Ted Kremenek2008-02-181-6/+28
| | | | | | | | | | | | function. Will probably make this a separate command line option later. Added "--analyze-function" option to the driver to (gradually) allow different analyses to only be run on specific functions. Currently only --grsimple uses this option. llvm-svn: 47285
* Added --grsimple-view option to clang driver; this is the same asTed Kremenek2008-02-151-4/+7
| | | | | | | | --grsimple except that it visualizes the ExplodedGraph using dot and outputs the current function being analyzed. --grsimple is now silent except when it emits diagnostics. llvm-svn: 47146
* Renamed GRConstants => GRSimpleVals.Ted Kremenek2008-02-141-8/+8
| | | | | | Moved driver logic for --grsimple to GRSimpleVals.cpp. llvm-svn: 47137
* Put back the top-level asm code; all tests pass now.Anders Carlsson2008-02-081-0/+6
| | | | llvm-svn: 46868
* Back out 46855 for now, it causes test failures on Darwin.Anders Carlsson2008-02-081-6/+0
| | | | llvm-svn: 46867
* Handle top-level asm declarations.Anders Carlsson2008-02-071-0/+6
| | | | llvm-svn: 46855
* Added proof-of-concept NULL pointer diagnostics to GRConstants.Ted Kremenek2008-02-071-3/+5
| | | | | | Modified the driver to pass the Diagnostic object to GRConstants. llvm-svn: 46847
* move the codegen ASTConsumer out of the driver into libcodegen,Chris Lattner2008-02-061-63/+1
| | | | | | | eliminating a bunch of forwarding methods and generally simplifying things. llvm-svn: 46792
* pull .ll and .bc writing out of the ASTConsumer destructors into some topChris Lattner2008-02-061-71/+14
| | | | | | | | | level code in clang. This is a cleanup, but does implement "-o" for -emit-llvm. One effect of this is that "clang foo.c -emit-llvm" will now emit into foo.ll instead of stdout. Use "clang foo.c -emit-llvm -o -" or "clang < foo.c -emit-llvm" to get the old behavior. llvm-svn: 46791
* rewrite some of the type refinement code to eliminate dangling pointersChris Lattner2008-02-051-4/+1
| | | | | | simplify the code and generally make it more robust. llvm-svn: 46745
* Modified LiveVariables to perform all of its base initialization in the ctor,Ted Kremenek2008-01-291-21/+17
| | | | | | | | | and now we require a FunctionDecl* object so that we can also keep track of all of the ParmDecls. Modified clients of LiveVariables to conform to the new interface. llvm-svn: 46490
* Driver now passes the top-level FunctionDecl* to GRConstants.Ted Kremenek2008-01-291-5/+17
| | | | | | | Refactoring: for GREngine and GRConstants, pushed references to CFG, ASTContext, and the top-level FunctionDecl into ExplodedGraphImpl. llvm-svn: 46475
* Added passing "ASTContext" to both GREngine and GRConstants.Ted Kremenek2008-01-241-3/+4
| | | | | | Added initial support for integer casting operations to GRConstants. llvm-svn: 46298
* Hooked up the GRConstants analysis to the driver.Ted Kremenek2008-01-161-6/+6
| | | | | | | Fixed some compilation errors with GREngine that showed up during template instantiation. llvm-svn: 46074
* Add first pieces of support for parsing and representing Chris Lattner2008-01-121-0/+17
| | | | | | extern "C" in C++ mode. Patch by Mike Stump! llvm-svn: 45904
* Fix some 80 col violationsChris Lattner2008-01-101-17/+12
| | | | llvm-svn: 45808
* Added most of the boilerplate to the driver needed to run the graph-reachabilityTed Kremenek2008-01-081-0/+19
| | | | | | constant propagation analysis. llvm-svn: 45747
* Substituted all instances of the string "Objc" for "ObjC". This fixesTed Kremenek2008-01-071-62/+62
| | | | | | | some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. llvm-svn: 45715
* Refactor the decl printer, patch by Mike Stump!Chris Lattner2008-01-021-47/+52
| | | | llvm-svn: 45497
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | discussion of this change. llvm-svn: 45410
* Make output files binary mode for -emit-llvm-bcChristopher Lamb2007-12-241-2/+4
| | | | llvm-svn: 45348
* Almost the best possible handling of stdin/stdout for llvm-emit-bc!Christopher Lamb2007-12-241-6/+10
| | | | llvm-svn: 45346
* Better handing of stdin/stdout for -emit-llvm-bcChristopher Lamb2007-12-241-3/+3
| | | | llvm-svn: 45345
* Allow bitcode output to be redirected to stdout.Christopher Lamb2007-12-241-1/+7
| | | | llvm-svn: 45340
* Implement -emit-llvm-bc optionSeo Sanghyeon2007-12-241-6/+50
| | | | llvm-svn: 45339
* Directory restructing of Analysis files.Ted Kremenek2007-12-211-1/+1
| | | | | | | | | | | Created include/clang/Analysis/Analyses directory. - Moved LiveVariables.h and UninitializedValues.h into this dir. Moved ExprDeclBitVector.h into Analysis/Support. Updated all clients who use these headers to reflect the new paths. llvm-svn: 45292
* Converted uses of scoped_ptr to OwningPtr.Ted Kremenek2007-12-201-7/+9
| | | | llvm-svn: 45265
* Created initial implementation of "BuildSerializer", and ASTConsumerTed Kremenek2007-12-201-2/+39
| | | | | | | which serializes ASTs to a common output directory. This ASTConsumer is invoked using a combination of "-o" and "-serialize" from the driver. llvm-svn: 45241
* Split serialization ASTConsumers into two consumers: SingleFileSerializer andTed Kremenek2007-12-191-39/+77
| | | | | | | | BuildSerializer. The former serializes a single translation unit to a corresponding .ast file. The second serializes ASTs to a common emission direction. The latter is not fully implemented yet. llvm-svn: 45232
* Interned MainFileID within SourceManager. Since SourceManager is referenced byTed Kremenek2007-12-191-7/+7
| | | | | | | | | both Preprocessor and ASTContext, we no longer need to explicitly pass MainFileID around in function calls that also pass either Preprocessor or ASTContext. This resulted in some nice cleanups in the ASTConsumers and the driver. llvm-svn: 45228
* Removed "SourceFile" from TranslationUnit. This same information will (soon)Ted Kremenek2007-12-191-8/+7
| | | | | | | be available by querying the SourceManager within the ASTContext referenced by the TranslationUnit. llvm-svn: 45223
* Removed storing inode and device number in TranslationUnit.Ted Kremenek2007-12-191-9/+13
| | | | | | | | | | Added "SourceFile" string to TranslationUnit to record corresponding source file. Updated serialization of TranslationUnits and logic in the driver to correctly pass the source file information to the serializer. llvm-svn: 45211
* Moved generation of the name of the serialized AST file intoTed Kremenek2007-12-191-1/+13
| | | | | | CreateASTSerializer. llvm-svn: 45201
* Moved ReadBitcodeFile and EmitBitcodeFile out of TranslationUnit and made themTed Kremenek2007-12-181-1/+1
| | | | | | | the standalone functions ReadASTBitcodeFile and EmitASTBitcodeFile respectively. llvm-svn: 45180
* Moved TranslationUnit from Driver to AST library.Ted Kremenek2007-12-181-1/+1
| | | | llvm-svn: 45175
* Changed -serialize-ast to not create a temporary directory, but insteadTed Kremenek2007-12-131-2/+1
| | | | | | | | create a .ast file in the current working directory. This mirrors the behavior of the -c option for gcc. Later we should add the ability to write the serialized file anywhere. llvm-svn: 45004
* Set target data layout info in module.Chris Lattner2007-12-131-0/+1
| | | | llvm-svn: 45003
* Implemented -serialize-ast option for the driver. This is not really testedTed Kremenek2007-12-131-0/+38
| | | | | | and is a work in progress. llvm-svn: 44967
* more cleanups changing things like getInstanceVariables to iterators.Chris Lattner2007-12-121-7/+5
| | | | llvm-svn: 44930
* resolve some fixmes and clean up some code by eliminating the get*Vars apis ↵Chris Lattner2007-12-121-6/+8
| | | | | | to some classes and use iterators instead. llvm-svn: 44927
* Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. NowTed Kremenek2007-12-111-3/+3
| | | | | | | | | | | | | | | | | | SourceManager is passed by reference, allowing the SourceManager to be associated with a specific translation unit, and not the entire execution of the driver. Modified all users of Diagnostics to comply with this new interface. Integrated SourceManager as a member variable of TargetInfo. TargetInfo will eventually be associated with a single translation unit (just like SourceManager). Made the SourceManager reference in ASTContext private. Provided accessor getSourceManager() for clients to use instead. Modified clients to comply with new interface. llvm-svn: 44878
* Fix an ast-print/ast-dump bug.Chris Lattner2007-12-031-2/+2
| | | | llvm-svn: 44550
* Warn about unsupported codegen with the diags machinery, giving us:Chris Lattner2007-12-021-1/+1
| | | | | | | | | | | | | t.c:3322:5: warning: cannot codegen this yet __asm__ ("bswap %0" : "+r" (_data)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ instead of: Unimplemented stmt! (AsmStmt 0x80eaa0 <t.c:3331:5, line:3334:28>) llvm-svn: 44501
* Several fixes/simplifications surrounding how we stream top-level decl AST's.Steve Naroff2007-11-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following code... typedef struct cssm_data {} CSSM_DATA, *CSSM_DATA_PTR; struct Y { int A; }; struct X { int A; } D; struct X E, F; ...now produces the following output... > ../../Debug/bin/clang xx.c -ast-print Read top-level tag decl: 'cssm_data' typedef struct cssm_data CSSM_DATA; typedef struct cssm_data *CSSM_DATA_PTR; Read top-level tag decl: 'Y' Read top-level tag decl: 'X' Read top-level variable decl: 'D' Read top-level variable decl: 'E' Read top-level variable decl: 'F' ...which is much more accurate than the previous -ast-print output... typedef struct cssm_data CSSM_DATA; typedef struct cssm_data CSSM_DATA; Read top-level variable decl: 'D' Read top-level variable decl: 'E' Read top-level variable decl: 'E' llvm-svn: 44421
* Converted AST Pretty-Printer to use iostreams instead of FILE*. This fixesTed Kremenek2007-11-281-97/+104
| | | | | | | | | a bug where the statement pretty-printer used iostreams but the AST printer did not. This was an issue when dumping ASTs to something other than stderr. Updated SerializationTest to use the new iostreams interface for the AST printer. llvm-svn: 44417
* Implement support for -fwritable-strings and make the code generatorChris Lattner2007-11-281-4/+7
| | | | | | merge string literals when it is not provided. llvm-svn: 44394
* Migrated static functions that print decls into a DeclPrinter class,Ted Kremenek2007-11-271-76/+112
| | | | | | | | | | which is now used (or subclasssed) by the ASTConsumers. This new class stores a FILE* that is used for writing, instead of just hardwiring output to stderr (it defaults to stderr if no FILE* is provided). Modified CreateASTPrinter() to accept a FILE* for printing. llvm-svn: 44377
* Make sure Sema::ParsedFreeStandingDeclSpec() returns a decl representing the ↵Steve Naroff2007-11-171-1/+1
| | | | | | | | type. Adding basic printing to StmtPrinter::PrintRawDecl(). llvm-svn: 44208
* Fix regression with ObjC method definitions and -ast-printSteve Naroff2007-11-131-0/+3
| | | | llvm-svn: 44088
* Clean up types, removing some casts. Patch contributed byChris Lattner2007-11-131-1/+1
| | | | | | Cedric Venet. llvm-svn: 44050
OpenPOWER on IntegriCloud