summaryrefslogtreecommitdiffstats
path: root/clang/AST/ASTContext.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Switch arraytypes over to using a FoldingSet instead of a stupid linearChris Lattner2007-01-271-12/+17
| | | | | | | search. This reduces 'dumb' lookups from 1225 to 359, speeding up parse of carbon.h from 0.173 to 0.156s (10%). llvm-svn: 39319
* Switch pointers over to using a FoldingSet to unique them instead ofChris Lattner2007-01-271-9/+16
| | | | | | | | "obviously braindead" linear searches. reduces the number of slow type lookups from 10K to 883 on carbon.h, speeding up parsing from 3.5 to 1.26s. llvm-svn: 39312
* Eliminate "obviously braindead" canonicalization of function types, usingChris Lattner2007-01-271-19/+14
| | | | | | | a foldingset instead. This reduces the number of slow type lookups from 32K to 10K, which speeds up parsing of carbon.h from 11s to 3.5s. llvm-svn: 39311
* Use a cache in TypedefDecl to make ASTContext::getTypedefType trivial.Chris Lattner2007-01-261-10/+3
| | | | | | | This speeds up parsing carbon.h from 16.0s to 11.3s, reducing slow lookups from 63K to 32K. llvm-svn: 39308
* rename some classes, no functionality changes.Chris Lattner2007-01-261-6/+6
| | | | llvm-svn: 39307
* TagDecl now holds a cache for the type corresponding to it. This speeds upChris Lattner2007-01-261-10/+3
| | | | | | | | ASTContext::getTagDeclType by not having to do a linear search. With this, parse time for carbon.h drops from 21.8s to 16.0s and # slow lookups drop from 83K to 63K. llvm-svn: 39306
* start gather stats on types processed. carbon.h currently yields:Chris Lattner2007-01-261-0/+58
| | | | | | | | | | | | | | | | | | | | | *** AST Context Stats: 30594 types total. 19 builtin types 3929 pointer types 308 array types 18883 function types with proto 8 function types with no proto 2988 typename (typedef) types 4459 tagged types 1476 struct types 80 union types 0 class types 2903 enum types 83298 slow type lookups Next up, making type canonicalization not trivially silly. llvm-svn: 39305
* Add TaggedType, which represents tagged decls as types. Create these whenChris Lattner2007-01-231-0/+17
| | | | | | converting a declspec with TST = struct/union. Pretty print as well. llvm-svn: 39284
* Make name lookup properly obey C namespaces, simplify decl construction ↵Chris Lattner2007-01-221-1/+1
| | | | | | byeliminating the 'next' pointer from the ctor, and add initial support forparsing struct/union tags. llvm-svn: 39266
* implement a fixme: make BuiltinType have an enum, specifying which type it is,Chris Lattner2006-12-031-21/+21
| | | | | | instead of having a string. llvm-svn: 39237
* implement AST representation for function types with and without a prototype.Chris Lattner2006-12-021-1/+81
| | | | | | | | | | | | | | | | | | | | This lets us pretty print stuff like this: void foo() { int X; X = sizeof(void (*(*)())()); X = sizeof(int(*)(int, float, ...)); X = sizeof(void (*(int arga, void (*argb)(double Y)))(void* Z)); as: X = sizeof(void (*(*)())()) X = sizeof(int (*)(int, float, ...)) X = sizeof(void (*(int, void (*)(double)))(void *)) Ah the wonders of 'modern' C syntax! llvm-svn: 39232
* Create a new TypeNameType class, which represents typedefs as types. ThisChris Lattner2006-11-201-1/+18
| | | | | | | | | | allows us to handle stuff like: typedef int G; .. X = sizeof(G); llvm-svn: 39189
* Implement parsing, printing and AST'ing of array types (except for the bounds).Chris Lattner2006-11-121-3/+31
| | | | | | | | | | This allows us to handle: int (*A)[restrict static 4][6]; for example. llvm-svn: 39176
* Implement and use isa/dyncast/cast etc for Type classes.Chris Lattner2006-11-121-2/+2
| | | | llvm-svn: 39175
* Teach ASTContext to delete all created types in its dtor.Chris Lattner2006-11-121-22/+42
| | | | | | | Teach getPointerType to (stupidly) memoize all created pointers. Give types an enum so we can implement classof. llvm-svn: 39174
* Build ASTs for the pointer qualifiers on declarators. This allows us toChris Lattner2006-11-121-0/+50
| | | | | | | | | | parse (and print) things like: int* const* restrict* const volatile*** etc. llvm-svn: 39173
* restructure code to build the framework for creating types from declarators.Chris Lattner2006-11-111-48/+0
| | | | llvm-svn: 39166
* add the builtin typesChris Lattner2006-11-101-0/+49
| | | | llvm-svn: 39164
* Let ASTContext hold target info, since it's usefulChris Lattner2006-11-101-0/+22
llvm-svn: 39162
OpenPOWER on IntegriCloud