summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a gcc Wuninitialized false positive.Daniel Dunbar2011-02-101-1/+1
| | | | llvm-svn: 125298
* When we're writing macro definitions to an AST/PCH File, sort theDouglas Gregor2011-02-101-7/+27
| | | | | | | macro definitions by macro name first. That way, we'll get a stable ordering in the AST/PCH file. llvm-svn: 125297
* For -Woverloaded-virtual take into account canonical methods. Fixes ↵Argyrios Kyrtzidis2011-02-101-2/+3
| | | | | | rdar://8979966 & http://llvm.org/PR9182. llvm-svn: 125296
* Fix family-friendly-o, tsk tsk.Daniel Dunbar2011-02-101-1/+1
| | | | llvm-svn: 125293
* IRgen: Fix an immediate-exit-from-fn style nit.Daniel Dunbar2011-02-101-5/+4
| | | | llvm-svn: 125289
* Implement two related optimizations that make de-serialization ofDouglas Gregor2011-02-104-35/+306
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AST/PCH files more lazy: - Don't preload all of the file source-location entries when reading the AST file. Instead, load them lazily, when needed. - Only look up header-search information (whether a header was already #import'd, how many times it's been included, etc.) when it's needed by the preprocessor, rather than pre-populating it. Previously, we would pre-load all of the file source-location entries, which also populated the header-search information structure. This was a relatively minor performance issue, since we would end up stat()'ing all of the headers stored within a AST/PCH file when the AST/PCH file was loaded. In the normal PCH use case, the stat()s were cached, so the cost--of preloading ~860 source-location entries in the Cocoa.h case---was relatively low. However, the recent optimization that replaced stat+open with open+fstat turned this into a major problem, since the preloading of source-location entries would now end up opening those files. Worse, those files wouldn't be closed until the file manager was destroyed, so just opening a Cocoa.h PCH file would hold on to ~860 file descriptors, and it was easy to blow through the process's limit on the number of open file descriptors. By eliminating the preloading of these files, we neither open nor stat the headers stored in the PCH/AST file until they're actually needed for something. Concretely, we went from *** HeaderSearch Stats: 835 files tracked. 364 #import/#pragma once files. 823 included exactly once. 6 max times a file is included. 3 #include/#include_next/#import. 0 #includes skipped due to the multi-include optimization. 1 framework lookups. 0 subframework lookups. *** Source Manager Stats: 835 files mapped, 3 mem buffers mapped. 37460 SLocEntry's allocated, 11215575B of Sloc address space used. 62 bytes of files mapped, 0 files with line #'s computed. with a trivial program that uses a chained PCH including a Cocoa PCH to *** HeaderSearch Stats: 4 files tracked. 1 #import/#pragma once files. 3 included exactly once. 2 max times a file is included. 3 #include/#include_next/#import. 0 #includes skipped due to the multi-include optimization. 1 framework lookups. 0 subframework lookups. *** Source Manager Stats: 3 files mapped, 3 mem buffers mapped. 37460 SLocEntry's allocated, 11215575B of Sloc address space used. 62 bytes of files mapped, 0 files with line #'s computed. for the same program. llvm-svn: 125286
* Adjust the object files to be linked in when mcount profilingRoman Divacky2011-02-101-7/+33
| | | | | | is specified in the FreeBSD linker driver. llvm-svn: 125285
* Implement mcount profiling, enabled via -pg.Roman Divacky2011-02-106-7/+41
| | | | llvm-svn: 125282
* Drop the 'InBits' part from the name of RecordSizeInBits as the value is inKen Dyck2011-02-101-5/+5
| | | | | | character units. llvm-svn: 125281
* Eliminate some signed-to-unsigned comparision warnings introduced inKen Dyck2011-02-101-2/+4
| | | | | | r125156. llvm-svn: 125280
* CMake: LLVM_NO_RTTI must be obsolete now!NAKAMURA Takumi2011-02-1015-30/+0
| | | | llvm-svn: 125275
* Move the check that gives functions with unique-external types unique-externalJohn McCall2011-02-102-4/+13
| | | | | | | linkage into Decl.cpp. Disable this logic for extern "C" functions, because the operative rule there is weaker. Fixes rdar://problem/8898466 llvm-svn: 125268
* Run ~GRState() when reclaiming GRStates.Ted Kremenek2011-02-101-0/+1
| | | | llvm-svn: 125262
* static analyzer: Make GRStates reference counted, with reference counts ↵Ted Kremenek2011-02-101-0/+2
| | | | | | | | managed by ExplodedNodes. This reduces memory usage of the analyzer on sqlite by another 5%. llvm-svn: 125260
* Split 'include/clang/StaticAnalyzer' into ↵Ted Kremenek2011-02-1083-213/+213
| | | | | | | | 'include/clang/StaticAnalyzer/Core' and 'include/clang/StaticAnalyzer/Checkers'. This layout matches lib/StaticAnalyzer, which corresponds to two StaticAnalyzer libraries. llvm-svn: 125251
* If an aggregate is returned as 'sret' argument then let debugger know about ↵Devang Patel2011-02-101-0/+6
| | | | | | this. llvm-svn: 125249
* Fix scoping of method declarations and issue Fariborz Jahanian2011-02-092-8/+34
| | | | | | | warning when same parameter name used multiple times. // rdar://8877730 llvm-svn: 125229
* Parse: add support for parsing CUDA kernel callsPeter Collingbourne2011-02-092-10/+57
| | | | llvm-svn: 125219
* Lexer: add CUDA kernel call tokensPeter Collingbourne2011-02-091-0/+8
| | | | llvm-svn: 125218
* AST, Sema, Serialization: add CUDAKernelCallExpr and related semantic actionsPeter Collingbourne2011-02-0912-19/+136
| | | | llvm-svn: 125217
* AST, Sema, Serialization: keep track of cudaConfigureCallPeter Collingbourne2011-02-094-0/+35
| | | | llvm-svn: 125216
* Do not emit AT_MIPS_linkage_name for Objective-C method static variable i.Devang Patel2011-02-091-1/+2
| | | | llvm-svn: 125210
* Finish up the diagnostic client before we've torn down the ASTReader,Douglas Gregor2011-02-091-3/+3
| | | | | | | since the diagnostic client might poke at source locations that have not yet been deserialized. llvm-svn: 125204
* Driver/Frontend: Wire up -mregparm=.Daniel Dunbar2011-02-093-3/+13
| | | | llvm-svn: 125201
* Non-void functions need to return some value.Nick Lewycky2011-02-091-5/+13
| | | | llvm-svn: 125185
* Give these little helper functions definitions so that newer gccs stopJohn McCall2011-02-091-5/+9
| | | | | | complaining. llvm-svn: 125184
* Remove vtables from the Stmt hierarchy; this was pretty easy asJohn McCall2011-02-0910-613/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | there were only three virtual methods of any significance. The primary way to grab child iterators now is with Stmt::child_range children(); Stmt::const_child_range children() const; where a child_range is just a std::pair of iterators suitable for being llvm::tie'd to some locals. I've left the old child_begin() and child_end() accessors in place, but it's probably a substantial penalty to grab the iterators individually now, since the switch-based dispatch is kindof inherently slower than vtable dispatch. Grabbing them together is probably a slight win over the status quo, although of course we could've achieved that with vtables, too. I also reclassified SwitchCase (correctly) as an abstract Stmt class, which (as the first such class that wasn't an Expr subclass) required some fiddling in a few places. There are somewhat gross metaprogramming hooks in place to ensure that new statements/expressions continue to implement getSourceRange() and children(). I had to work around a recent clang bug; dgregor actually fixed it already, but I didn't want to introduce a selfhosting dependency on ToT. llvm-svn: 125183
* Emit debug info for objc_selector.Devang Patel2011-02-091-0/+6
| | | | llvm-svn: 125163
* When IRgen refers to a function declaration that is not a definition,Douglas Gregor2011-02-092-2/+8
| | | | | | | | | | and we later find the definition, make sure that we add the definition (not the declaration) to the list of deferred definitions to emit. Fixes PR8864. Thanks to Nick Lewycky for testing this patch out llvm-svn: 125157
* Convert RecordLayout::Size to CharUnits from bits. No changes toKen Dyck2011-02-097-28/+41
| | | | | | functionality intended. llvm-svn: 125156
* static analyzer: Further reduce the analyzer's memory usage when analyzing ↵Ted Kremenek2011-02-095-4/+122
| | | | | | | | | | | | sqlite3 by 7-10% by recylcing "uninteresting" ExplodedNodes. The optimization involves eagerly pruning ExplodedNodes from the ExplodedGraph that contain practically no difference between the predecessor and successor nodes. For example, if the state is different between a predecessor and a node, the node is left in. Only for the 'environment' component of the state do we not care if the ExplodedNodes are different. This paves the way for future optimizations where we can reclaim the environment objects. llvm-svn: 125154
* NonTypeTemplateParmDecl is just a DeclaratorDecl, not a VarDecl.John McCall2011-02-094-65/+140
| | | | | | | Also, reorganize and make very explicit the logic for determining the value kind and type of a referenced declaration. llvm-svn: 125150
* If an aggregate argument is passed indirectly because it has non trivialDevang Patel2011-02-095-9/+20
| | | | | | | | destructor or copy constructor than let debug info know about it. Radar 8945514. llvm-svn: 125142
* analyzer, retain/release checker: Remove hack where objects passed in ↵Ted Kremenek2011-02-081-18/+0
| | | | | | message to 'self' are no longer tracked. llvm-svn: 125130
* Update for API change.Rafael Espindola2011-02-081-2/+2
| | | | llvm-svn: 125129
* When checking the 'weak' and 'weakref' attributes, look for non-externalJohn McCall2011-02-081-21/+40
| | | | | | | linkage rather than the presence of the 'static' storage class specifier. Fixes rdar://problem/8814626. llvm-svn: 125126
* Fix an IRGen bug in property setter calls whenFariborz Jahanian2011-02-081-1/+11
| | | | | | setter and getter types mismatch. // rdar://8966864 llvm-svn: 125125
* [analyzer] Move the files in lib/StaticAnalyzer to lib/StaticAnalyzer/Core.Argyrios Kyrtzidis2011-02-0840-48/+64
| | | | | | | Eventually there will also be a lib/StaticAnalyzer/Frontend that will handle initialization and checker registration. Yet another library to avoid cyclic dependencies between Core and Checkers. llvm-svn: 125124
* [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.cpp -> ↵Argyrios Kyrtzidis2011-02-082-1/+1
| | | | | | lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp llvm-svn: 125123
* [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.h -> ↵Argyrios Kyrtzidis2011-02-0811-12/+12
| | | | | | lib/StaticAnalyzer/Checkers/ExperimentalChecks.h llvm-svn: 125122
* [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> ↵Argyrios Kyrtzidis2011-02-0832-32/+32
| | | | | | lib/StaticAnalyzer/Checkers/InternalChecks.h llvm-svn: 125121
* Split the serialized representation for the detailed preprocessingDouglas Gregor2011-02-082-190/+225
| | | | | | | | | | record away from the core processor record. The tangling of these two data structures led to some inefficiencies (e.g., deserializing all of the detailed preprocessing record when we didn't need it, such as while performing code completion) along with some unnecessary ugliness. llvm-svn: 125117
* AST: support for pre-arg expressions on CallExpr subclassesPeter Collingbourne2011-02-081-11/+24
| | | | llvm-svn: 125115
* StmtPrinter: factor out arg printing code to PrintCallArgsPeter Collingbourne2011-02-081-3/+8
| | | | llvm-svn: 125114
* Allow multiple -B prefixes. Patch by Joerg Sonnenberger.Benjamin Kramer2011-02-081-6/+12
| | | | llvm-svn: 125111
* Clear the linkage cache recursively. Fixes PR8926.John McCall2011-02-081-0/+31
| | | | llvm-svn: 125104
* In Sema::CheckShadow, get the DeclContext from the variable that we are checkingArgyrios Kyrtzidis2011-02-081-4/+3
| | | | | | | | instead from the Scope; Inner scopes in bodies don't have DeclContexts associated with them. Fixes http://llvm.org/PR9160 & rdar://problem/8966163. llvm-svn: 125097
* Support for objextive-c++ use of property-dot syntax as receiverFariborz Jahanian2011-02-083-7/+10
| | | | | | | in liu of a class method getter. // rdar://8962253 llvm-svn: 125094
* Update the writing of the block-information block in the AST fileDouglas Gregor2011-02-081-2/+82
| | | | | | | format, so that llvm-bcanalyzer knows about all of the various record kinds. llvm-svn: 125086
* Reorganize CodeGen{Function,Module} to eliminate the unfortunateJohn McCall2011-02-0821-499/+511
| | | | | | | | Block{Function,Module} base class. Minor other refactorings. Fixed a few address-space bugs while I was there. llvm-svn: 125085
OpenPOWER on IntegriCloud