| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.
The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.
llvm-svn: 82501
|
|
|
|
| |
llvm-svn: 81835
|
|
|
|
|
|
| |
location. Patch by Enea Zaffanella.
llvm-svn: 81672
|
|
|
|
| |
llvm-svn: 81346
|
|
|
|
| |
llvm-svn: 80432
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsRecordType() -> Type::getAs<RecordType>()
Type::getAsPointerType() -> Type::getAs<PointerType>()
Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsTagType() -> Type::getAs<TagType>()
And remove Type::getAsReferenceType(), etc.
This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.
llvm-svn: 77510
|
|
|
|
|
|
|
|
| |
and __has_trivial_constructor builtin pseudo-functions and
additionally implements __has_trivial_copy and __has_trivial_assign,
from John McCall!
llvm-svn: 76916
|
|
|
|
| |
llvm-svn: 76327
|
|
|
|
|
|
|
|
|
| |
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.
llvm-svn: 76193
|
|
|
|
|
|
| |
Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents.
llvm-svn: 76139
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method is intended to eventually replace the individual
Type::getAsXXXType<> methods.
The motivation behind this change is twofold:
1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of
them are basically copy-and-paste.
2) By centralizing the implementation of the getAs<Type> logic we can more
smoothly move over to Doug Gregor's proposed canonical type smart pointer
scheme.
Along with this patch:
a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>.
b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>.
llvm-svn: 76098
|
|
|
|
| |
llvm-svn: 75641
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.
This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.
By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time.
Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.
llvm-svn: 75314
|
|
|
|
|
|
| |
- Refactored slightly to make control flow more obvious.
llvm-svn: 74637
|
|
|
|
|
|
|
|
|
| |
For ExtVectorType, initializer is splatted to all elements.
For VectorType, initializer is bitcast to vector type.
Verified that for VectorType, output is identical to gcc.
llvm-svn: 74600
|
|
|
|
|
|
|
| |
Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.
llvm-svn: 74506
|
|
|
|
|
|
| |
Add support for scalar to vector and partially initialized vector constant initializers.
llvm-svn: 74299
|
|
|
|
|
|
| |
foo has a constant address.
llvm-svn: 73321
|
|
|
|
|
|
|
|
| |
preprocessor and initialize it early in clang-cc. This
ensures that __has_builtin works in all modes, not just
when ASTContext is around.
llvm-svn: 73319
|
|
|
|
| |
llvm-svn: 72887
|
|
|
|
|
|
| |
correctly.
llvm-svn: 72886
|
|
|
|
| |
llvm-svn: 72636
|
|
|
|
| |
llvm-svn: 72621
|
|
|
|
| |
llvm-svn: 72607
|
|
|
|
|
|
| |
of a reference correctly.
llvm-svn: 72463
|
|
|
|
|
|
|
|
| |
an integral constant expression, maintain a cache of the value and the
is-an-ICE flag within the VarDecl itself. This eliminates
exponential-time behavior of the Fibonacci template metaprogram.
llvm-svn: 72428
|
|
|
|
| |
llvm-svn: 71405
|
|
|
|
| |
llvm-svn: 70689
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"aligned" attribute. Previously, we were skipping over these
attributes when we jumped directly to the canonical type. Now,
ASTContext::getTypeInfo walks through typedefs and other
"non-canonical" types manually, looking for "aligned" attributes on
typedefs.
As part of this change, I moved the GNU-specific logic (such as
determining the alignment of void or of a function pointer) out of the
expression evaluator and into ASTContext::getTypeInfo.
llvm-svn: 70497
|
|
|
|
| |
llvm-svn: 70406
|
|
|
|
| |
llvm-svn: 70317
|
|
|
|
|
|
|
| |
int. Note that constant int->complex float and float->complex int casts
were being miscompiled.
llvm-svn: 69821
|
|
|
|
|
|
|
|
|
| |
addRecordToClass.
- Among other things, this fixes a crash when applying sizeof to an
interface with synthesized ivars, although things still aren't
"correct" here.
llvm-svn: 69675
|
|
|
|
|
|
| |
declaring a static Block 'const'.
llvm-svn: 69306
|
|
|
|
|
|
| |
Expr as an LValue.
llvm-svn: 68763
|
|
|
|
|
|
| |
No functionality change (really).
llvm-svn: 68726
|
|
|
|
| |
llvm-svn: 68075
|
|
|
|
| |
llvm-svn: 67593
|
|
|
|
|
|
| |
Evaluate for __extension__ and __builtin_choose_expr.
llvm-svn: 67506
|
|
|
|
| |
llvm-svn: 67503
|
|
|
|
|
|
| |
unclear areas. Maybe Doug can shed some light on some of the fixmes.
llvm-svn: 67059
|
|
|
|
|
|
| |
chosen sub-expression, rather than just evaluating the condition.
llvm-svn: 66018
|
|
|
|
|
|
| |
integer __real__ and __imag__. Not sure how I missed this.
llvm-svn: 65677
|
|
|
|
|
|
|
|
| |
normal expression, and change Evaluate and IRGen to evaluate it like a
normal expression. This simplifies the code significantly, and fixes
PR3396.
llvm-svn: 65622
|
|
|
|
| |
llvm-svn: 65613
|
|
|
|
|
|
|
|
|
| |
- For types whose native representation is a pointer.
- Use to replace ExprConstant.cpp:HasPointerEvalType,
CodeGenFunction::isObjCPointerType.
llvm-svn: 65569
|
|
|
|
|
|
|
|
|
| |
pretty sure we want to keep constant expression verification outside of
Evaluate. Because of that, the short-circuit evaluation doesn't
generally make sense, and the comma warning doesn't make sense in its
current form.
llvm-svn: 65525
|
|
|
|
|
|
|
| |
The big difference here is that (like string literal) @encode has
array type, not pointer type.
llvm-svn: 65391
|
|
|
|
|
|
| |
Remove support for "Class<P>". Will be making this an error.
llvm-svn: 65332
|
|
|
|
| |
llvm-svn: 65305
|