| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
other things which might mess with the variable's type.
llvm-svn: 153733
|
|
|
|
|
|
| |
testers.
llvm-svn: 153660
|
|
|
|
|
|
|
| |
a complete object, the memcpy needs to use the data size of
the structure instead of its sizeof() value. Fixes PR12204.
llvm-svn: 153613
|
|
|
|
|
|
| |
Thanks to NAKAMURA Takumi for finding it!
llvm-svn: 153383
|
|
|
|
|
|
|
|
|
|
| |
metadata in clang for booleans and".
For i686 targets (eg. cygwin), I saw "Range must not be empty!" in verifier.
It produces (i32)[0x80000000:0x80000000) from (uint64_t)[0xFFFFFFFF80000000ULL:0x0000000080000000ULL), for signed i32 on MDNode::Range.
llvm-svn: 153382
|
|
|
|
|
|
| |
c++ enums.
llvm-svn: 153360
|
|
|
|
|
|
|
|
|
|
| |
(Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
|
|
|
|
|
|
|
|
| |
track whether the referenced declaration comes from an enclosing
local context. I'm amenable to suggestions about the exact meaning
of this bit.
llvm-svn: 152491
|
|
|
|
|
|
|
|
| |
we correctly emit loads of BlockDeclRefExprs even when they
don't qualify as ODR-uses. I think I'm adequately convinced
that BlockDeclRefExpr can die.
llvm-svn: 152479
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.
My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.
Docs are forthcoming to document the implementation and behavior of these features.
llvm-svn: 152137
|
|
|
|
|
|
| |
types of the pointer arguments.
llvm-svn: 151927
|
|
|
|
|
|
|
|
| |
generated block literal for lambdas which are immediately converted to block pointer type. This simplifies the AST, avoids an unnecessary copy of the lambda and makes it much easier to avoid copying the result onto the heap.
Note that this transformation has a substantial semantic effect outside of ARC: it gives the converted lambda lifetime semantics similar to a block literal. With ARC, the effect is much less obvious because the lifetime of blocks is already managed.
llvm-svn: 151797
|
|
|
|
|
|
| |
conversion-to-block-pointer outside of ARC. Testcases coming up soon.
llvm-svn: 151603
|
|
|
|
|
|
| |
implement the retain+autorelease outside of ARC, and there's a bug that causes the generated code to crash in ARC (which I think is unrelated to my code, although I'm not completely sure).
llvm-svn: 151428
|
|
|
|
| |
llvm-svn: 151150
|
|
|
|
| |
llvm-svn: 150931
|
|
|
|
|
|
| |
std::initializer_list is now complete. Onward to array new.
llvm-svn: 150926
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now generate temporary arrays to back std::initializer_list objects
initialized with braces. The initializer_list is then made to point at
the array. We support both ptr+size and start+end forms, although
the latter is untested.
Array lifetime is correct for temporary std::initializer_lists (e.g.
call arguments) and local variables. It is untested for new expressions
and member initializers.
Things left to do:
Massively increase the amount of testing. I need to write tests for
start+end init lists, temporary objects created as a side effect of
initializing init list objects, new expressions, member initialization,
creation of temporary objects (e.g. std::vector) for initializer lists,
and probably more.
Get lifetime "right" for member initializers and new expressions. Not
that either are very useful.
Implement list-initialization of array new expressions.
llvm-svn: 150803
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
conversion to function pointer. Rather than having IRgen synthesize
the body of this function, we instead introduce a static member
function "__invoke" with the same signature as the lambda's
operator() in the AST. Sema then generates a body for the conversion
to function pointer which simply returns the address of __invoke. This
approach makes it easier to evaluate a call to the conversion function
as a constant, makes the linkage of the __invoke function follow the
normal rules for member functions, and may make life easier down the
road if we ever want to constexpr'ify some of lambdas.
Note that IR generation is responsible for filling in the body of
__invoke (Sema just adds a dummy body), because the body can't
generally be expressed in C++.
Eli, please review!
llvm-svn: 150783
|
|
|
|
|
|
| |
conversion-to-function-pointer operator.
llvm-svn: 150660
|
|
|
|
| |
llvm-svn: 150649
|
|
|
|
|
|
|
|
|
| |
-fno-objc-arc-exceptions. This will allow the optimizer to perform
optimizations which are only safe under that flag.
This is a part of rdar://10803830.
llvm-svn: 150644
|
|
|
|
| |
llvm-svn: 150452
|
|
|
|
|
|
|
|
|
|
|
| |
constructor, and that constructor is used to initialize an object of static
storage duration such that all members and bases are initialized by constant
expressions, constant initialization is performed. In this case, the object
can still have a non-trivial destructor, and if it does, we must emit a dynamic
initializer which performs no initialization and instead simply registers that
destructor.
llvm-svn: 150419
|
|
|
|
|
|
| |
examples seem to work. Tests coming up soon.
llvm-svn: 150293
|
|
|
|
| |
llvm-svn: 150146
|
|
|
|
| |
llvm-svn: 150058
|
|
|
|
| |
llvm-svn: 149205
|
|
|
|
|
|
|
|
| |
consume one or more of their arguments. If not done, this will cause a leak
as method will not consume the argument when receiver is null.
// rdar://10444474
llvm-svn: 149184
|
|
|
|
|
|
|
| |
around, in the process cleaning up the various gcc/msvc compiler
workarounds.
llvm-svn: 149036
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add atomic-to/from-nonatomic cast types
- Emit atomic operations for arithmetic on atomic types
- Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load
- Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function.
- Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it.
Still to do:
- Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg.
- Add a signal fence builtin
- Properly set the fenv state in atomic operations on floating point values
- Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context)
- Fix the many remaining corner cases
llvm-svn: 148242
|
|
|
|
| |
llvm-svn: 148179
|
|
|
|
|
|
|
| |
c++ objects with non-trivial assignment/copy functions.
Also, one additional sema check. // rdar://6137845
llvm-svn: 147817
|
|
|
|
|
|
| |
with non-trivial copies. // rdar://6137845
llvm-svn: 147735
|
|
|
|
|
|
|
|
| |
currently turned off. // rdar://6137845
Also, fixes a test case which should be nonatomic under
new API.
llvm-svn: 147691
|
|
|
|
|
|
|
|
| |
for copying atomic properties of c++ objects
with non-trivial copy assignment in setters/getters.
Not yet used. // rdar://6137845
llvm-svn: 147636
|
|
|
|
|
|
| |
clients. No functionality change.
llvm-svn: 147318
|
|
|
|
| |
llvm-svn: 146413
|
|
|
|
|
|
|
|
|
|
|
| |
pass in the correct alignment when known.
The test includes a FIXME for a related case involving calls; it's a bit more complicated to fix because the RValue class doesn't keep track of alignment.
<rdar://problem/10463337>
llvm-svn: 145862
|
|
|
|
|
|
| |
change.)
llvm-svn: 145753
|
|
|
|
|
|
| |
review comment.
llvm-svn: 145741
|
|
|
|
|
|
| |
I'll be introducing uses of the specified alignment soon.
llvm-svn: 145736
|
|
|
|
|
|
|
|
|
|
|
| |
generic pushDestroy function.
This would reduce the number of useful declarations in
CGTemporaries.cpp to one. Since CodeGenFunction::EmitCXXTemporary
does not deserve its own file, move it to CGCleanup.cpp and delete
CGTemporaries.cpp.
llvm-svn: 145202
|
|
|
|
|
|
| |
lvalues. PR11376.
llvm-svn: 144745
|
|
|
|
|
|
|
|
|
|
| |
need to provide a 'dominating IP' which is guaranteed to
dominate the (de)activation point but which cannot be avoided
along any execution path from the (de)activation point to
the push-point of the cleanup. Using the entry block is
bad mojo.
llvm-svn: 144276
|
|
|
|
|
|
|
|
|
|
|
|
| |
full-expression. Naturally they're inactive before we enter
the block literal expression. This restores the intended
behavior that blocks belong to their enclosing scope.
There's a useful -O0 / compile-time optimization that we're
missing here with activating cleanups following straight-line
code from their inactive beginnings.
llvm-svn: 144268
|
|
|
|
|
|
| |
opaque values. Silly C type system.
llvm-svn: 144144
|
|
|
|
| |
llvm-svn: 143908
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions. It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.
Most of the effort here is in dealing with the various
clients of the AST. I've gone ahead and simplified the
ObjC rewriter's use of properties; other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily. Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.
I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.
llvm-svn: 143867
|
|
|
|
|
|
|
|
|
| |
The OpenCL single precision division operation is only required to
be accurate to 2.5ulp. Annotate the fdiv instruction with metadata
which signals to the backend that an imprecise divide instruction
may be used.
llvm-svn: 143136
|