| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 75705
|
| |
|
|
|
|
| |
I don't love the name, however it simplifies the code and is a worthwhile change. If/when we come up with a better name, we can do a search/replace.
llvm-svn: 75650
|
| |
|
|
| |
llvm-svn: 75641
|
| |
|
|
| |
llvm-svn: 75446
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Also, enable them in sema so that they are tested, and now that the x86 backend
has stablized.
llvm-svn: 74983
|
| |
|
|
| |
llvm-svn: 73604
|
| |
|
|
|
|
| |
ternary operator.
llvm-svn: 72842
|
| |
|
|
| |
llvm-svn: 72838
|
| |
|
|
| |
llvm-svn: 72656
|
| |
|
|
| |
llvm-svn: 72652
|
| |
|
|
|
|
|
| |
any body can spot codegen bugs with volatile, or knows of any in the
bug database, let me know.
llvm-svn: 72572
|
| |
|
|
| |
llvm-svn: 72457
|
| |
|
|
|
|
| |
improve codegen in some cases.
llvm-svn: 72273
|
| |
|
|
|
|
|
| |
evaluated first. This can also improve codegen just a bit as we might
have another register to play with for the evaluation of the rhs.
llvm-svn: 72226
|
| |
|
|
| |
llvm-svn: 72117
|
| |
|
|
|
|
| |
Stub out VisitCXXExprWithTemporaries.
llvm-svn: 72103
|
| |
|
|
|
|
|
|
|
|
|
| |
types.
- I broke this in the switch to representing interfaces with opaque
types.
- <rdar://problem/6822660> clang crashes on subscript of interface in
32-bit mode
llvm-svn: 70009
|
| |
|
|
| |
llvm-svn: 69949
|
| |
|
|
|
|
| |
subsequently crashed).
llvm-svn: 69567
|
| |
|
|
|
|
| |
Adapted from patch by Tim Northover.
llvm-svn: 69566
|
| |
|
|
| |
llvm-svn: 69050
|
| |
|
|
| |
llvm-svn: 68615
|
| |
|
|
|
|
| |
GEP is only 32 or 64. So promote index to 32 in such cases.
llvm-svn: 68590
|
| |
|
|
| |
llvm-svn: 68330
|
| |
|
|
|
|
|
|
|
|
| |
better name) is the option that SmallTalk can use to intercept all
overflows, including unsigned. I added some testcases so we don't
break anything.
Also included is another patch from David for += and friends.
llvm-svn: 68267
|
| |
|
|
|
|
| |
clang option code that is and two bug fixes.
llvm-svn: 68240
|
| |
|
|
|
|
| |
Clang's test suite.
llvm-svn: 68230
|
| |
|
|
|
|
| |
clang option code that is.
llvm-svn: 68221
|
| |
|
|
| |
llvm-svn: 67899
|
| |
|
|
| |
llvm-svn: 67895
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LHS type and the computation result type; this encodes information into
the AST which is otherwise non-obvious. Fix Sema to always come up with the
right answer for both of these types. Fix IRGen and the analyzer to
account for these changes. This fixes PR2601. The approach is inspired
by PR2601 comment 2.
Note that this changes real *= complex in CodeGen from a silent
miscompilation to an explicit error.
I'm not really sure that the analyzer changes are correct, or how to
test them... someone more familiar with the analyzer should check those
changes.
llvm-svn: 67889
|
| |
|
|
| |
llvm-svn: 67499
|
| |
|
|
| |
llvm-svn: 67165
|
| |
|
|
|
|
| |
unclear areas. Maybe Doug can shed some light on some of the fixmes.
llvm-svn: 67059
|
| |
|
|
|
|
|
|
| |
performance that the type of the returned llvm::Value for an expression
matches the converted type of the clang::Expr; mismatches will cause all
sorts of errors and silent miscompilations.
llvm-svn: 66321
|
| |
|
|
| |
llvm-svn: 66319
|
| |
|
|
|
|
| |
crash in ir-gen.
llvm-svn: 66302
|
| |
|
|
|
|
| |
chosen sub-expression, rather than just evaluating the condition.
llvm-svn: 66018
|
| |
|
|
|
|
| |
first extend the integer to the correct width.
llvm-svn: 66009
|
| |
|
|
| |
llvm-svn: 65688
|
| |
|
|
|
|
|
|
| |
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: 65487
|
| |
|
|
|
|
|
| |
The big difference here is that (like string literal) @encode has
array type, not pointer type.
llvm-svn: 65391
|
| |
|
|
| |
llvm-svn: 65285
|
| |
|
|
|
|
| |
stuff is mostly done. Move BlockHasCopyDispose up.
llvm-svn: 65242
|
| |
|
|
|
|
| |
The size calculation is improved.
llvm-svn: 64994
|
| |
|
|
| |
llvm-svn: 64961
|
| |
|
|
|
|
| |
starting to work for blocks.
llvm-svn: 64570
|