| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
It is currently off (so no tests). This is wip.
llvm-svn: 166892
|
|
|
|
| |
llvm-svn: 166703
|
|
|
|
|
|
| |
and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942.
llvm-svn: 166676
|
|
|
|
| |
llvm-svn: 166497
|
|
|
|
|
|
|
|
|
|
|
| |
combination of a load+objc_release; this is generally better
for tools that try to track why values are retained and
released. Also use objc_storeStrong when copying a block
(again, only at -O0), which requires us to do a preliminary
store of null in order to compensate for objc_storeStrong's
assign semantics.
llvm-svn: 166085
|
|
|
|
|
|
|
|
|
|
|
| |
if (CGM.getModuleDebugInfo())
DebugInfo = CGM.getModuleDebugInfo()
into a call:
maybeInitializeDebugInfo();
This is a simplification for a possible future fix of PR13942.
llvm-svn: 166019
|
|
|
|
| |
llvm-svn: 165395
|
|
|
|
|
|
|
|
| |
in the ABI arrangement, and leave a hook behind so that we can easily
tweak CCs on platforms that use different CCs by default for C++
instance methods.
llvm-svn: 159894
|
|
|
|
|
|
|
|
|
|
|
|
| |
literal helper functions. All helper functions (global
and locals) use block_invoke as their prefix. Local literal
helper names are prefixed by their enclosing mangled function
names. Blocks in non-local initializers (e.g. a global variable
or a C++11 field) are prefixed by their mangled variable name.
The descriminator number added to end of the name starts off
with blank (for first block) and _<N> (for the N+2-th block).
llvm-svn: 159206
|
|
|
|
|
|
|
| |
blocks and lambdas, based heavily on a patch from Meador Inge. Fixes
PR12746 / <rdar://problem/11465120>.
llvm-svn: 156925
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It reduces the amount of emitted debug information:
1) DIEs in .debug_info have types DW_TAG_compile_unit, DW_TAG_subprogram,
DW_TAG_inlined_subroutine (for opt builds) and DW_TAG_lexical_block only.
2) .debug_str contains only function names.
3) No debug data for types/namespaces/variables is emitted.
4) The data in .debug_line is enough to produce valid stack traces with
function names and line numbers.
Reviewed by Eric Christopher.
llvm-svn: 156160
|
|
|
|
|
|
|
| |
the alignment might actually exceed the max field alignment; don't
assert in this case.
llvm-svn: 155937
|
|
|
|
|
|
|
|
|
|
|
|
| |
more aligned than the block header but also contains something
smaller than the block-header alignment but not exactly half
the difference between the large alignment and the header
alignment. Got that?
I'm really not sure what I was thinking with the buggy computation
here, but the fix is pretty obvious.
llvm-svn: 155662
|
|
|
|
|
|
|
|
| |
jump into these scopes, and the cleanup-entering code sometimes wants
to do some operations first (e.g. a GEP), which can leave us with
unparented IR.
llvm-svn: 154684
|
|
|
|
|
|
|
|
| |
FunctionDecl::Create calls as well.
rdar://11079003
llvm-svn: 154578
|
|
|
|
|
|
| |
so.
llvm-svn: 154569
|
|
|
|
|
|
|
|
| |
non-const copy constructor.
This was caused by the code deciding the number of fields in the byref structure using a different test to the part of the code creating the GEPs into said structure.
llvm-svn: 154013
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
optional argument passed through the variadic ellipsis)
potentially affects how we need to lower it. Propagate
this information down to the various getFunctionInfo(...)
overloads on CodeGenTypes. Furthermore, rename those
overloads to clarify their distinct purposes, and make
sure we're calling the right one in the right place.
This has a nice side-effect of making it easier to construct
a function type, since the 'variadic' bit is no longer
separable.
This shouldn't really change anything for our existing
platforms, with one minor exception --- we should now call
variadic ObjC methods with the ... in the "right place"
(see the test case), which I guess matters for anyone
running GNUStep on MIPS. Mostly it's just a substantial
clean-up.
llvm-svn: 150788
|
|
|
|
|
|
| |
CodeGenModule.
llvm-svn: 149943
|
|
|
|
| |
llvm-svn: 149798
|
|
|
|
|
|
|
| |
around, in the process cleaning up the various gcc/msvc compiler
workarounds.
llvm-svn: 149036
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
APValue::Array and APValue::MemberPointer. All APValue values can now be emitted
as constants.
Add new CGCXXABI entry point for emitting an APValue MemberPointer. The other
entrypoints dealing with constant member pointers are no longer necessary and
will be removed in a later change.
Switch codegen from using EvaluateAsRValue/EvaluateAsLValue to
VarDecl::evaluateValue. This performs caching and deals with the nasty cases in
C++11 where a non-const object's initializer can refer indirectly to
previously-initialized fields within the same object.
Building the intermediate APValue object incurs a measurable performance hit on
pathological testcases with huge initializer lists, so we continue to build IR
directly from the Expr nodes for array and record types outside of C++11.
llvm-svn: 148178
|
|
|
|
|
|
| |
change.)
llvm-svn: 145753
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
block-typed __block variables using objc_retainBlock
and objc_dispose. Previously we were using
_Block_object_assign and _Block_object_destroy
with BLOCK_BYREF_CALLER, which causes the runtime
to completely ignore the retain and release.
In most cases this doesn't cause catastrophe
because the retain/release are balanced and
because the block in the variable was copied
upon assignment there. However, the stack
copy of the variable will be released when
it goes out of scope, which is a problem if
that value was released due to an assignment
to the heap copy. Similarly, a leak can occur
if the variable is assigned after the copy to
the heap.
llvm-svn: 144162
|
|
|
|
|
|
|
| |
rvale-references are captured by reference
in blocks. // rdar://9971124.
llvm-svn: 143583
|
|
|
|
|
|
|
| |
In this case, temporary value is copied into block descriptor
as their own copy to work on. // rdar://9971124
llvm-svn: 143399
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Start handling debug line and scope information better:
Migrate most of the location setting within the larger API in CGDebugInfo and
update a lot of callers.
Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
and replace it with DILexicalBlockFile usage.
Finishes off the rest of rdar://10246360
after fixing a few bugs that were exposed in gdb testsuite testing.
llvm-svn: 141893
|
|
|
|
| |
llvm-svn: 141796
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate most of the location setting within the larger API in CGDebugInfo and
update a lot of callers.
Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
and replace it with DILexicalBlockFile usage.
Finishes off the rest of rdar://10246360
llvm-svn: 141732
|
|
|
|
| |
llvm-svn: 140866
|
|
|
|
| |
llvm-svn: 140637
|
|
|
|
|
|
|
|
|
|
| |
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.
AST serialization changes are next up.
llvm-svn: 139605
|
|
|
|
|
|
|
|
| |
feature akin to the ARC runtime checks. Removes a terrible hack where
IR gen needed to find the declarations of those symbols in the translation
unit.
llvm-svn: 139404
|
|
|
|
| |
llvm-svn: 137472
|
|
|
|
| |
llvm-svn: 137126
|
|
|
|
|
|
|
|
| |
LLVM.h imports
them into the clang namespace.
llvm-svn: 135852
|
|
|
|
| |
llvm-svn: 135370
|
|
|
|
|
|
| |
of flags. No functionality change.
llvm-svn: 134997
|
|
|
|
| |
llvm-svn: 134989
|
|
|
|
|
|
| |
and kill a lot of redundant code.
llvm-svn: 134988
|
|
|
|
| |
llvm-svn: 134893
|
|
|
|
| |
llvm-svn: 134831
|