| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Amadini.
This change introduces a new expression node type, OffsetOfExpr, that
describes __builtin_offsetof. Previously, __builtin_offsetof was
implemented using a unary operator whose subexpression involved
various synthesized array-subscript and member-reference expressions,
which was ugly and made it very hard to instantiate as a
template. OffsetOfExpr represents the AST more faithfully, with proper
type source information and a more compact representation.
OffsetOfExpr also has support for dependent __builtin_offsetof
expressions; it can be value-dependent, but will never be
type-dependent (like sizeof or alignof). This commit introduces
template instantiation for __builtin_offsetof as well.
There are two major caveats to this patch:
1) CodeGen cannot handle the case where __builtin_offsetof is not a
constant expression, so it produces an error. So, to avoid
regressing in C, we retain the old UnaryOperator-based
__builtin_offsetof implementation in C while using the shiny new
OffsetOfExpr implementation in C++. The old implementation can go
away once we have proper CodeGen support for this case, which we
expect won't cause much trouble in C++.
2) __builtin_offsetof doesn't work well with non-POD class types,
particularly when the designated field is found within a base
class. I will address this in a subsequent patch.
Fixes PR5880 and a bunch of assertions when building Boost.Python
tests.
llvm-svn: 102542
|
|
|
|
|
|
| |
use the new version.
llvm-svn: 102274
|
|
|
|
| |
llvm-svn: 102273
|
|
|
|
|
|
| |
for derived-to-base casts.
llvm-svn: 102270
|
|
|
|
|
|
|
| |
permitted in C++ but not in C. Fixes PR6900. Clang can now handle all
of Boost.Lambda's regression tests.
llvm-svn: 102170
|
|
|
|
|
|
|
|
|
| |
- Unfortunately, this requires some horrible code in CGObjCMac which always
allocats a CGBitFieldInfo because we don't currently build a proper layout
for Objective-C classes. It needs to be cleaned up, but I don't want the
bit-field cleanups to be blocked on that.
llvm-svn: 100474
|
|
|
|
|
|
|
| |
null checks, and make sure we elide null checks when accessing base class
members.
llvm-svn: 99963
|
|
|
|
|
|
| |
Anton Yartsev!
llvm-svn: 99817
|
|
|
|
|
|
| |
((id)cat)->isa. Fixes radar 7709015.
llvm-svn: 97672
|
|
|
|
|
|
| |
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!
llvm-svn: 96224
|
|
|
|
|
|
| |
(Fixes radar 7609722).
llvm-svn: 95406
|
|
|
|
|
|
| |
BeginConditionalBranch/EndConditionalBranch.
llvm-svn: 95308
|
|
|
|
|
|
| |
CGExprConstant. Fixes PR5674.
llvm-svn: 95063
|
|
|
|
| |
llvm-svn: 94938
|
|
|
|
|
|
|
|
|
|
| |
"ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits
ones as appropriate.
Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType,
fromQuantity(), and getQuantity() for clarity.
llvm-svn: 93153
|
|
|
|
|
|
| |
lvalue to poke, no functionality change.
llvm-svn: 93075
|
|
|
|
| |
llvm-svn: 92439
|
|
|
|
| |
llvm-svn: 92162
|
|
|
|
|
|
|
| |
would have a higher respect for its own code. This is getting old, is this
warning really adding value?
llvm-svn: 91779
|
|
|
|
|
|
| |
expressions.
llvm-svn: 91686
|
|
|
|
| |
llvm-svn: 91498
|
|
|
|
|
|
| |
instead of abort to improve codesize and codegen.
llvm-svn: 91374
|
|
|
|
| |
llvm-svn: 91341
|
|
|
|
|
|
| |
(fixes radar 7465023).
llvm-svn: 91171
|
|
|
|
|
|
| |
for logical not.
llvm-svn: 91112
|
|
|
|
| |
llvm-svn: 91108
|
|
|
|
|
|
| |
this construct, but might as well for completeness.
llvm-svn: 91071
|
|
|
|
|
|
| |
(fixes radar 7457534).
llvm-svn: 90995
|
|
|
|
|
|
| |
was not needed (fixes radar 7453430).
llvm-svn: 90981
|
|
|
|
|
|
| |
in objective-c++ mode without being too lenient.
llvm-svn: 90895
|
|
|
|
| |
llvm-svn: 90800
|
|
|
|
| |
llvm-svn: 90098
|
|
|
|
| |
llvm-svn: 90044
|
|
|
|
|
|
|
|
|
|
|
| |
implement it explicitly or assert that it doesn't make sense for a scalar.
This caught a couple interesting issues: one, CK_BaseToDerivedMemberPointer
casts were getting silently miscompiled, and two, Sema was constructing some
strange implicit casts of type CK_UserDefinedConversion.
The change in SemaExprCXX makes sure the cast kinds are getting set correctly.
llvm-svn: 89987
|
|
|
|
| |
llvm-svn: 89986
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of checking explicitly for an EnumConstantDecl. This folds references
to constant integer VarDecls, which has two benefits:
1. Slightly smaller emitted code from emitting a constant instead of a load,
and skipping emitting some constant globals.
2. Some code forgets to define static constant member variables; emitting a
load instead of the value in that case leads to a link error. (Such programs
are technically not well-formed, but in practice build with g++.)
llvm-svn: 89934
|
|
|
|
|
|
| |
the member decl refers to an enum. Thanks to Eli for pointing this out!
llvm-svn: 89775
|
|
|
|
| |
llvm-svn: 89705
|
|
|
|
| |
llvm-svn: 89692
|
|
|
|
| |
llvm-svn: 89678
|
|
|
|
| |
llvm-svn: 89467
|
|
|
|
| |
llvm-svn: 89201
|
|
|
|
|
|
| |
more cases. No intended visible change.
llvm-svn: 88968
|
|
|
|
| |
llvm-svn: 88901
|
|
|
|
| |
llvm-svn: 86256
|
|
|
|
|
|
|
| |
type to look at the volatile specifier. I found these all from just
hand auditing the code.
llvm-svn: 85967
|
|
|
|
| |
llvm-svn: 85560
|
|
|
|
|
|
|
|
| |
using the new LLVM support for this. This is temporarily hiding
behind horrible and ugly #ifdefs until the time when the optimizer
is stable (hopefully a week or so). Until then, lets make it "opt in" :)
llvm-svn: 85446
|
|
|
|
|
|
|
|
| |
from other vectors.
If I can find it again, I will check in a testcase.
llvm-svn: 85032
|
|
|
|
|
|
| |
both scalar and aggregates.
llvm-svn: 84910
|