- Sep 22, 2007
-
-
Chris Lattner authored
for *which* apfloat to use for a particular type. llvm-svn: 42234
-
- Sep 19, 2007
-
-
Steve Naroff authored
Remove SelectorTable/SelectorInfo, simply store all selectors in the central IdentifierTable. Rationale: We currently have a separate table to unique ObjC selectors. Since I don't need all the instance data in IdentifierInfo, I thought this would save space (and make more sense conceptually). It turns out the cost of having duplicate entries for unary selectors (i.e. names without colons) outweighs the cost difference between the IdentifierInfo & SelectorInfo structures. Here is the data: Two tables: *** Selector/Identifier Stats: # Selectors/Identifiers: 51635 Bytes allocated: 1999824 One table: *** Identifier Table Stats: # Identifiers: 49500 Bytes allocated: 1990316 llvm-svn: 42139
-
- Sep 17, 2007
-
-
Steve Naroff authored
Add support for ObjC keyword selectors. - Add SelectorInfo/SelectorTable classes, modeled after IdentifierInfo/IdentifierTable. - Add SelectorTable instance to ASTContext, created lazily through ASTContext::getSelectorInfo(). - Add SelectorInfo slot to ObjcMethodDecl. - Add helper function to derive a SelectorInfo from ObjcKeywordInfo. Misc: Got the Decl stats stuff up and running again...it was missing support for ObjC AST's. llvm-svn: 42023
-
- Sep 16, 2007
-
-
Chris Lattner authored
llvm-svn: 42010
-
- Sep 14, 2007
-
-
Steve Naroff authored
Now that the dust has settled on the Decl refactoring, I noticed FieldDecl didn't need NextDeclarator. As a result, I'm removing it. Removing both slots (NextDeclarator/Next) end up reducing the size of fields/ivars by 40%. llvm-svn: 41948
-
- Sep 11, 2007
-
-
Gabor Greif authored
warnings that some compilers diagnose llvm-svn: 41847
-
- Sep 06, 2007
-
-
Steve Naroff authored
The goal of this commit is to get just enough Sema support to recognize Objective-C classes as types. That said, the AST nodes ObjcInterfaceDecl, ObjcInterfaceType, and ObjcClassDecl are *very* preliminary. The good news is we no longer need -parse-noop (aka MinimalActions) to parse cocoa.m. llvm-svn: 41752
-
- Aug 30, 2007
-
-
Steve Naroff authored
llvm-svn: 41618
-
Steve Naroff authored
Refactored Array/VariableArray, moving SizeModifier/IndexTypeQuals back up to Array. These attributes are not specific to VLA's. Most of them are specific to array parameter types. llvm-svn: 41616
-
Steve Naroff authored
Fix the following redefinition errors submitted by Keith Bauer... [dylan:~/llvm/tools/clang] admin% cat tentative_decls.c // incorrectly generates redefinition error extern int array[3]; int array[3]; // incorrectly generates a redefinition error extern void nup(int a[3]); void nup(int a[3]) {} It turns out that this exposed a fairly major flaw in the type system, array types were never getting uniqued! This is because all array types contained an expression, which aren't unique. To solve this, we now have 2 array types, ConstantArrayType and VariableArrayType. ConstantArrayType's are unique, VAT's aren't. This is a fairly extensive set of fundamental changes. Fortunately, all the tests pass. Nevertheless, there may be some collateral damage:-) If so, let me know! llvm-svn: 41592
-
- Aug 28, 2007
-
-
Chris Lattner authored
directly in it. Remove TargetInfo::getEnumPolicy, as there is only one policy that we support right now. llvm-svn: 41548
-
- Aug 27, 2007
-
-
Chris Lattner authored
llvm-svn: 41503
-
Chris Lattner authored
llvm-svn: 41500
-
Steve Naroff authored
Changed Sema::UsualArithmeticConversions to use the new API. This fixes the following case... _Complex double X; double y; void foo() { X = X + y; } [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang complex.c -parse-ast-dump Read top-level variable decl: 'X' Read top-level variable decl: 'y' void foo() (CompoundStmt 0x2605cc0 (BinaryOperator 0x2605ca0 '_Complex double' '=' (DeclRefExpr 0x2605c10 '_Complex double' Decl='X' 0x2605ab0) (BinaryOperator 0x2605c80 '_Complex double' '+' (DeclRefExpr 0x2605c30 '_Complex double' Decl='X' 0x2605ab0) (ImplicitCastExpr 0x2605c70 '_Complex double' (DeclRefExpr 0x2605c50 'double' Decl='y' 0x2605ae0))))) llvm-svn: 41483
-
Steve Naroff authored
Tweak a comment and assert. llvm-svn: 41475
-
Steve Naroff authored
Replaced ASTContext::maxComplexType() with ASTContext::getFloatingTypeOfSizeWithinDomain(). Changed Sema::UsualArithmeticConversions to correctly implement complex/float conversions, using maxFloatingType() with getFloatingTypeOfSizeWithinDomain(). llvm-svn: 41474
-
- Aug 17, 2007
-
-
Anders Carlsson authored
llvm-svn: 41136
-
- Aug 01, 2007
-
-
Steve Naroff authored
Add comments to getTypeOfExpr/getTypeOfType. Also add instances of TypeOfExpr/TypeOfType to the Types vector (so we can keep track of them). llvm-svn: 40677
-
Steve Naroff authored
Two typeof() related changes... - Changed the name of ASTContext::getTypeOfType(Expr*)->getTypeOfExpr(). - Remove FIXME for TypeOfExpr::getAsStringInternal(). This will work fine for printing the AST. It isn't ideal for error diagnostics (since it's more natural to display the expressions type). One "random" (or at least delayed:-) change... - Changed all "ext_typecheck_*" diagnostics from EXTENSION->WARNING. Reason: Since -pedantic is now off (by default), these diagnostics were never being emitted (which is bad). With this change, clang will emit the warning all the time. The only downside (wrt GCC compatibility) is -pedantic-errors will not turn this diagnostics into errors (a "feature" of making tagging them with EXTENSION). When/if this becomes an issue, we can revisit. llvm-svn: 40676
-
- Jul 31, 2007
-
-
Steve Naroff authored
Add parsing and AST support for GNU "typeof". Many small changes to lot's of files. Still some FIXME's, however the basic support is in place. llvm-svn: 40631
-
- Jul 24, 2007
-
-
Chris Lattner authored
Patch by Neil Booth! llvm-svn: 40452
-
- Jul 20, 2007
-
-
Chris Lattner authored
llvm-svn: 40113
-
Chris Lattner authored
llvm-svn: 40110
-
Chris Lattner authored
llvm-svn: 40068
-
- Jul 18, 2007
-
-
Chris Lattner authored
This allows us to compile this: struct abc { char A; double D; }; int foo() { return sizeof(struct abc); return __alignof__(struct abc); } Into: ret i32 16 ret i32 8 llvm-svn: 40010
-
Steve Naroff authored
First round of extended vector support. Here is an overview... - added ocu_vector_type attribute, Sema::HandleOCUVectorTypeAttribute(). - added new AST node, OCUVectorType, a subclass of VectorType. - added ASTContext::getOCUVectorType. - changed ASTContext::convertToVectorType() to ASTContext::getVectorType(). This is unrelated to extended vectors, however I was in the vicinity and it was on my todo list. Added a FIXME to Sema::HandleVectorTypeAttribute to deal with converting complex types. llvm-svn: 40007
-
Chris Lattner authored
hooked up to anything, so it's not very useful yet. llvm-svn: 40006
-
Chris Lattner authored
llvm-svn: 39996
-
- Jul 16, 2007
-
-
Chris Lattner authored
not all builtin types have size and alignment equal to pointers :) llvm-svn: 39887
-
- Jul 14, 2007
-
-
Chris Lattner authored
compute type alignment. This info is needed for struct layout. llvm-svn: 39850
-
Chris Lattner authored
llvm-svn: 39838
-
Chris Lattner authored
llvm-svn: 39837
-
Chris Lattner authored
where ASTContext can manage caches for struct layout, etc. llvm-svn: 39835
-
- Jul 13, 2007
-
-
Chris Lattner authored
Keith Bauer. llvm-svn: 39793
-
- Jul 07, 2007
-
-
Steve Naroff authored
Submitted by: Reviewed by: - Finished semantic analysis for vectors, added some diagnostics. - Added AST for vectors (instantiation, installation into the decl). - Fixed bug in ParseArraySubscriptExpr()...this crasher was introduced by me when we added the range support. - Turned pedantic off by default. Since vectors are gcc extensions, having pedantic on by default was annoying. Turning it off by default is also consistent with gcc (but this wasn't my primary motivation). - Tweaked some comments and diagnostics. Note: The type checking code is still under construction (for vectors). This will be my next check-in. llvm-svn: 39715
-
- Jun 22, 2007
-
-
Chris Lattner authored
types. llvm-svn: 39672
-
- 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
-
- Jun 03, 2007
-
-
Chris Lattner authored
'char', which varies based on the target. Instead of spreading target knowledge throughout the compiler, bifurcate char into Char_S and Char_U, and have ASTContext create the right one based on the target, when it starts up. llvm-svn: 39577
-
- May 27, 2007
-
-
Bill Wendling authored
Submitted by: Bill Wendling Reviewed by: Chris Lattner - Initial support for C++ references. Adding to the AST and Parser. Skeletal support added in the semantic analysis portion. Full semantic analysis is to be done soon. llvm-svn: 39496
-
- May 24, 2007
-
-
Chris Lattner authored
llvm-svn: 39488
-