- Sep 27, 2007
-
-
Steve Naroff authored
Add SelectorInfo (similar in spirit to IdentifierInfo). The key difference is SelectorInfo is not string-oriented, it is a unique aggregate of IdentifierInfo's (using a folding set). SelectorInfo also has a richer API that simplifies the parser/action interface. 3 noteworthy benefits: #1: It is cleaner. I never "liked" storing keyword selectors (i.e. foo:bar:baz) in the IdentifierTable. #2: It is more space efficient. Since Cocoa keyword selectors can be quite long, this technique is space saving. For Cocoa.h, pulling the keyword selectors out saves ~180k. The cost of the SelectorInfo data is ~100k. Saves ~80k, or 43%. #3: It results in many API simplifications. Here are some highlights: - Removed 3 actions (ActOnKeywordMessage, ActOnUnaryMessage, & one flavor of ObjcBuildMethodDeclaration that was specific to unary messages). - Removed 3 funky structs from DeclSpec.h (ObjcKeywordMessage, ObjcKeywordDecl, and ObjcKeywordInfo). - Removed 2 ivars and 2 constructors from ObjCMessageExpr (fyi, this space savings has not been measured). I am happy with the way it turned out (though it took a bit more hacking than I expected). Given the central role of selectors in ObjC, making sure this is "right" will pay dividends later. Thanks to Chris for talking this through with me and suggesting this approach. llvm-svn: 42395
-
- Sep 16, 2007
-
-
Chris Lattner authored
llvm-svn: 42014
-
Chris Lattner authored
Switch -parse-ast over to it. llvm-svn: 41991
-
- Aug 30, 2007
-
-
Chris Lattner authored
llvm-svn: 41611
-
- Jun 16, 2007
-
-
Chris Lattner authored
out of the llvm namespace. This makes the clang namespace be a sibling of llvm instead of being a child. The good thing about this is that it makes many things unambiguous. The bad things is that many things in the llvm namespace (notably data structures like smallvector) now require an llvm:: qualifier. IMO, libsystem and libsupport should be split out of llvm into their own namespace in the future, which will fix this issue. llvm-svn: 39659
-
- May 21, 2007
-
-
Chris Lattner authored
llvm-svn: 39478
-
- Feb 28, 2007
-
-
Steve Naroff authored
Go back to having the clang driver create ASTContext explicitly, passing it to Sema/ASTStreamer (separating the lifetime of ASTContext from the lifetime of Sema). One day it might be useful to consider creating a context object implicitly if one isn't provided (using default arguments in Sema's constructor). At this point, adding this convenience isn't necessary. llvm-svn: 39346
-
Steve Naroff authored
the prerocessor will be available via ASTContext). - Removed the public data member "PP" in ASTContext. - Changed ASTContext's contructor to take TargetInfo/IdentifierTable explicitly. - Implicitly create an ASTContext in Sema's constructor. This simplifies the clients job (and makes ASTContext more private). --As a side effect, added a "PrintStats" hook to Sema. To support this level of encapsulation, ASTContext is always dynamically allocated (by Sema). Previously, ASTContext was being allocated on the stack. I don't believe this should be a performance issue (since ASTContext is fairly course grain and tied to the lifetime of Sema currently). llvm-svn: 39345
-
- Jan 26, 2007
-
-
Chris Lattner authored
*** 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
-
- Nov 10, 2006
-
-
Chris Lattner authored
llvm-svn: 39161
-
Chris Lattner authored
interface exported by libast. llvm-svn: 39154
-
- Nov 09, 2006
-
-
Chris Lattner authored
llvm-svn: 39153
-
- Nov 04, 2006
-
-
Chris Lattner authored
and should be implemented with an ASTBuilder subclass anyway. llvm-svn: 39107
-
- Nov 03, 2006
-
-
Chris Lattner authored
llvm-svn: 39095
-
- Oct 16, 2006
-
-
Chris Lattner authored
declarations through the asm streamer. For a testcase like: int G; int H, I, *J; int func() {} 'clang -parse-print-ast' prints: Read top-level decl: G Read top-level decl: H Read top-level decl: I Read top-level decl: J Read top-level decl: func llvm-svn: 38992
-
- Oct 06, 2006
-
-
Chris Lattner authored
llvm-svn: 38960
-
- Aug 23, 2006
-
-
Chris Lattner authored
Add callbacks for same. Add "full locinfo" mode. llvm-svn: 38939
-
- Aug 18, 2006
-
-
Chris Lattner authored
llvm-svn: 38938
-
- Aug 17, 2006
-
-
Chris Lattner authored
llvm-svn: 38936
-
Chris Lattner authored
llvm-svn: 38935
-