summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Convert some more actions to smart pointers.Sebastian Redl2009-01-115-93/+106
| | | | | | | No performance regression in my basic test. Also fixed a type error in ActOnFinishSwitchStmt's arguments (body is a stmt). llvm-svn: 62032
* Fix a misleading comment.Steve Naroff2009-01-101-4/+4
| | | | llvm-svn: 62031
* This patch fixes the code gen failures which was a fallout fromFariborz Jahanian2009-01-105-17/+25
| | | | | | | | not merging protocol properties into the classes which use those protocols. With this patch, all my exceutable test pass again. llvm-svn: 62030
* Explicit declaration of property setters over-rideFariborz Jahanian2009-01-102-1/+32
| | | | | | prohibition of 'readonly' properties in an assignment. llvm-svn: 62028
* add a bunch of castToDeclContext/castFromDeclContext methods.Zhongxing Xu2009-01-101-3/+24
| | | | llvm-svn: 62027
* add castToDeclContext/castFromDeclContext methods to RecordDecl.Zhongxing Xu2009-01-101-1/+6
| | | | llvm-svn: 62026
* ccc: Introduce ToolChains for mapping Actions to Tools which canDaniel Dunbar2009-01-103-18/+68
| | | | | | | | | | | | | | | perform them. - A ToolChain is a coherent set of tools use in a compilation process. The idea is that a ToolChain holds roughly the information (specs, search paths, etc.) that is in a single gcc binary. - The default ToolChain is selected by the host and will generally correspond to what the default system compiler would do. However, this can be over-riden for a variety of purposes, for example the by the driver driver or for testing. llvm-svn: 62021
* ccc: Add generic assembler & linker tools which effectively shell outDaniel Dunbar2009-01-101-15/+43
| | | | | | to gcc. llvm-svn: 62020
* ccc: Add information about whether type can be user specified (a -xDaniel Dunbar2009-01-101-23/+45
| | | | | | argument) to InputType. llvm-svn: 62019
* Allow multiple Microsoft calling-convention keywords. Fixes ↵Douglas Gregor2009-01-102-2/+4
| | | | | | rdar://problem/6486133 llvm-svn: 62018
* assert if attempting to code gen. a property setter/getterFariborz Jahanian2009-01-101-0/+4
| | | | | | coming from a protocol. llvm-svn: 62017
* Don't bother setting NextDeclarator for EnumConstantDecls. It isn't usedDouglas Gregor2009-01-091-4/+0
| | | | llvm-svn: 62016
* When we see a reference to a struct, class, or union like "struct X"Douglas Gregor2009-01-099-19/+158
| | | | | | | | | | | | | | | | that is neither a definition nor a forward declaration and where X has not yet been declared as a tag, introduce a declaration into the appropriate scope (which is likely *not* to be the current scope). The rules for the placement of the declaration differ slightly in C and C++, so we implement both and test the various corner cases. This implementation isn't 100% correct due to some lingering issues with the function prototype scope (for a function parameter list) not being the same scope as the scope of the function definition. Testcase is FIXME'd; this probably isn't an important issue. Addresses <rdar://problem/6484805>. llvm-svn: 62014
* Add utils/SummarizeErrors.Daniel Dunbar2009-01-091-0/+99
| | | | | | | | - Little script for scanning a compile log and summarizing warnings, errors, assertions, and crashes. - Is very slow, and stack trace regexs probably only work on Darwin. llvm-svn: 62013
* Add some comments to the virtual work. Thanks to Doug Gregor for the review.Sebastian Redl2009-01-092-0/+7
| | | | llvm-svn: 62012
* ccc: Get host information via Driver methods.Daniel Dunbar2009-01-093-19/+48
| | | | llvm-svn: 62011
* Dead stores checker: Don't flag dead stores for self-assignments (common ↵Ted Kremenek2009-01-092-3/+15
| | | | | | escape hatch for 'unused variable' warnings). llvm-svn: 62010
* Enhance PTH 'getSpelling' caching:Ted Kremenek2009-01-093-30/+154
| | | | | | | | | | | | | | - Refactor caching logic into a helper class PTHSpellingSearch - Allow "random accesses" in the spelling cache, thus catching the remaining cases where 'getSpelling' wasn't hitting the PTH cache For -Eonly, PTH, Cocoa.h: - This reduces wall time by 3% (user time unchanged, sys time reduced) - This reduces the amount of paged source by 1112K. The remaining 1112K still being paged in is from somewhere else (investigating). llvm-svn: 62009
* Prevent a segfault for vaarg expressions on unsupported architectures.Sebastian Redl2009-01-091-2/+4
| | | | llvm-svn: 62008
* This patch removes mergeProperties and does the property lookupFariborz Jahanian2009-01-094-43/+14
| | | | | | in designated protocols lazily. llvm-svn: 62007
* Implement EmitUnsupportedRValue to generate an appropriately typed RValue.Daniel Dunbar2009-01-091-3/+13
| | | | llvm-svn: 62004
* Very basic support for pure virtual functions.Sebastian Redl2009-01-094-6/+75
| | | | llvm-svn: 62003
* Replace DeclContext's vector of ScopedDecl pointers with a linked listDouglas Gregor2009-01-098-24/+93
| | | | | | | | | | | | | | | | | | of ScopedDecls (using the new ScopedDecl::NextDeclInScope pointer). Performance-wise: - It's a net win in memory utilization, since DeclContext is now one pointer smaller than it used to be (std::vectors are typically 3 pointers; we now use 2 pointers) and - Parsing Cocoa.h with -fsyntax-only (with a Release-Asserts Clang) is about 1.9% faster than before, most likely because we no longer have the memory allocations and copying associated with the std::vector. I'll re-enable serialization of DeclContexts once I've sorted out the NextDeclarator/NextDeclInScope question. llvm-svn: 62001
* Make sure that ScopedDecls passed to DeclContext::addDecl are added into ↵Douglas Gregor2009-01-094-3/+28
| | | | | | their lexical context llvm-svn: 61998
* Always print out SourceManager stats with 'Stats' is true. This revealed ↵Ted Kremenek2009-01-091-2/+1
| | | | | | that PTH always pulls in the source pages with -fsyntax-only (investigating further). llvm-svn: 61996
* Provide a new kind of iterator, the specific_decl_iterator, thatDouglas Gregor2009-01-0915-281/+130
| | | | | | | | | filters the decls seen by decl_iterator with two criteria: the dynamic type of the declaration and a run-time predicate described by a member function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl considerably. It has no measurable performance impact. llvm-svn: 61994
* Emit more refined "unsupported" error for block expressions.Daniel Dunbar2009-01-091-0/+5
| | | | llvm-svn: 61993
* Give "unsupported" error on calls through block pointers instead ofDaniel Dunbar2009-01-092-6/+28
| | | | | | crashes. llvm-svn: 61992
* Move property API's up to ObjCContainerDecl (removing a lot of duplicate code).Steve Naroff2009-01-098-228/+127
| | | | | | | | | Add isa/cast/dyncast support for ObjCContainerDecl. Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing). More simplifications to Sema::ActOnAtEnd()... Added/changed some FIXME's as a result of the above work. llvm-svn: 61988
* Fix rdar://6480479 - [parser] infinite loop on invalid inputChris Lattner2009-01-092-0/+12
| | | | llvm-svn: 61975
* Convert block types in IRgen. This is not the correct type, butDaniel Dunbar2009-01-091-1/+3
| | | | | | matches llvm-gcc (?). llvm-svn: 61974
* Block pointer types are not aggregate types.Daniel Dunbar2009-01-091-1/+4
| | | | llvm-svn: 61973
* Don't crash when our FunctionDecl has a non-identifier nameDouglas Gregor2009-01-091-1/+2
| | | | llvm-svn: 61970
* Fix crash on null deference when searching for readwrite properties inDaniel Dunbar2009-01-092-13/+32
| | | | | | | categories. - Also, simplify nesting via early return. llvm-svn: 61968
* ccc: Start defining host information.Daniel Dunbar2009-01-093-21/+107
| | | | | | | | | - For use by the driver in places where the host alters driver behavior (for example, running as a driver driver on darwin). - Allow user override for testing purposes. llvm-svn: 61967
* Addressed the issue in <rdar://problem/6479085>, where we failed toDouglas Gregor2009-01-097-105/+141
| | | | | | | | | | | | | | | rewrite @class declarations that showed up within linkage specifications because those @class declarations never made it any place where the rewriter could find them. Moved all of the ObjC*Decl nodes over to ScopedDecls, so that they can live in the appropriate top-level or transparent DeclContext near the top level, e.g., TranslationUnitDecl or LinkageSpecDecl. Objective-C declarations now show up in a traversal of the declarations in a DeclContext (they didn't before!). This way, the rewriter finds all Objective-C declarations within linkage specifications. llvm-svn: 61966
* Re-enable PTH testing for Cocoa.h and Carbon.h (and include testing for ↵Ted Kremenek2009-01-093-4/+6
| | | | | | Objective-C++). llvm-svn: 61965
* Adding support for ObjC methods which have c-styleFariborz Jahanian2009-01-094-4/+9
| | | | | | parameter list. This is work in progress. llvm-svn: 61964
* Enable support for '-x objective-c++-header'.Ted Kremenek2009-01-091-10/+24
| | | | llvm-svn: 61963
* Simpler solution to LiteralSupport compatibility: just add one whitespace ↵Ted Kremenek2009-01-091-27/+15
| | | | | | character after each cached string. llvm-svn: 61962
* Invert assertion condition.Ted Kremenek2009-01-091-1/+1
| | | | llvm-svn: 61961
* Temporarily revert r61956 and r61957 (PTH tests failing).Ted Kremenek2009-01-092-4/+2
| | | | llvm-svn: 61960
* Enhance -fsyntax-only test of Carbon.h to also include testing for PTH.Ted Kremenek2009-01-081-1/+2
| | | | llvm-svn: 61958
* Enhance -fsyntax-only test of Cocoa.h to also include testing for PTH.Ted Kremenek2009-01-081-1/+2
| | | | llvm-svn: 61957
* PTH: For the cached spellings of literals, store one whitespace character ↵Ted Kremenek2009-01-081-12/+27
| | | | | | after the spelling to accomodate sanity checking in LiteralSuppoert.cpp. llvm-svn: 61956
* Add mm_malloc.h, patch by Sam Weinig.Anders Carlsson2009-01-081-0/+59
| | | | llvm-svn: 61954
* Place warning about 'readonly' property attributes whichFariborz Jahanian2009-01-083-2/+10
| | | | | | | are related to setter syntax under -Wreadonly-setter-attrs to prevent warnings in projects built with gcc. llvm-svn: 61953
* Revert my previous, failed attempt to pretty-print anonymous struct/union ↵Douglas Gregor2009-01-084-27/+11
| | | | | | accesses well. Added a FIXME so we know to revisit this later llvm-svn: 61951
* Fix ObjCInterfaceDecl::Destroy and ObjCProtocolDecl::Destroy to iterate and ↵Ted Kremenek2009-01-081-10/+4
| | | | | | destroy all contained ObjCMethodDecls in one sweep. This fixes a use-after-free error found by valgrind. llvm-svn: 61943
* Remove double-insertion of EnumConstantDecls. Thanks to Zhongxing Xu for ↵Douglas Gregor2009-01-081-5/+0
| | | | | | pointing this out llvm-svn: 61942
OpenPOWER on IntegriCloud