| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
evaluation of __builtin_nan*. Most of the work to make this work is in LLVM.
Fixes <rdar://problem/7696712> and part of PR 5255.
llvm-svn: 97383
|
|
|
|
| |
llvm-svn: 96054
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
side-effect of always folding the expression to the default argument of the parameter. For example:
void f(int a = 10) {
return a;
}
would always return 10, regardless of the passed in argument.
This fixes another 600 test failures. We're now down to only 137 failures!
llvm-svn: 95262
|
|
|
|
|
|
| |
definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function.
llvm-svn: 94999
|
|
|
|
|
|
|
| |
now that the "InBytes" part of the name is implied by the return type, rename
it to getDeclAlign().
llvm-svn: 94681
|
|
|
|
|
|
| |
constant Objective-C strings.
llvm-svn: 94274
|
|
|
|
| |
llvm-svn: 93942
|
|
|
|
|
|
| |
the LValue-related methods of APValue out of line to avoid header file leaching.
llvm-svn: 93512
|
|
|
|
|
|
|
|
|
|
| |
"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
|
|
|
|
|
|
|
| |
try to evaluate an expression as a constant boolean condition. This has
the same intended semantics as used in folding conditional operators.
llvm-svn: 92805
|
|
|
|
|
|
| |
any side-effects.
llvm-svn: 92453
|
|
|
|
|
|
| |
it doesn't know how to fold, like derived-to-base casts.
llvm-svn: 92173
|
|
|
|
| |
llvm-svn: 92162
|
|
|
|
|
|
|
| |
only takes a boolean second argument now. Update tests accordingly.
Currently the builtin still accepts the full range for compatibility.
llvm-svn: 91983
|
|
|
|
|
|
| |
functionality change.
llvm-svn: 91118
|
|
|
|
|
|
| |
recently introduced crash.
llvm-svn: 91070
|
|
|
|
| |
llvm-svn: 90521
|
|
|
|
|
|
| |
don't infinitely recurse for cases we can't evaluate.
llvm-svn: 90480
|
|
|
|
| |
llvm-svn: 90043
|
|
|
|
|
|
|
|
| |
static member constants. No significant visible difference at the moment
because it conservatively assumes the base has side effects. I'm planning to
use this for CodeGen.
llvm-svn: 89738
|
|
|
|
|
|
| |
methods. This fixes a crash when writing sizeof(Incomplete&), and lets ASTContext's methods do the right thing for CodeGen, which fixes PR5590.
llvm-svn: 89668
|
|
|
|
|
|
| |
PR5449.
llvm-svn: 88885
|
|
|
|
|
|
| |
initialization before main. Fixes pr5396.
llvm-svn: 86145
|
|
|
|
|
|
|
| |
type to look at the volatile specifier. I found these all from just
hand auditing the code.
llvm-svn: 85967
|
|
|
|
| |
llvm-svn: 85931
|
|
|
|
|
|
|
|
|
| |
integral constant expression, make sure to find where the initializer
was provided---inside or outside the class definition---since that can
affect whether we have an integral constant expression (and, we need
to see the initializer itself).
llvm-svn: 85741
|
|
|
|
| |
llvm-svn: 85538
|
|
|
|
| |
llvm-svn: 85526
|
|
|
|
| |
llvm-svn: 85453
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
that don't have sizes.
llvm-svn: 85435
|
|
|
|
|
|
|
|
|
|
| |
side-effects up front, as when we switch to the llvm intrinsic call
for __builtin_object_size later, it will have two evaluations.
We also finish off the intrinsic version of the code so we can just
turn it on once llvm has the intrinsic.
llvm-svn: 85324
|
|
|
|
| |
llvm-svn: 85174
|
|
|
|
|
|
| |
to clamp at 0 bytes left. WIP.
llvm-svn: 85157
|
|
|
|
| |
llvm-svn: 85140
|
|
|
|
| |
llvm-svn: 85136
|
|
|
|
| |
llvm-svn: 83267
|
|
|
|
|
|
|
|
| |
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.
llvm-svn: 82705
|
|
|
|
|
|
| |
This implements PR5034 and rdar://6836445.
llvm-svn: 82614
|
|
|
|
|
|
|
|
|
|
|
| |
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
|