| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 122634
|
|
|
|
|
|
|
|
| |
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.
llvm-svn: 121121
|
|
|
|
|
|
| |
reason this is limited to C++, and it's certainly not limited to temporaries.
llvm-svn: 120996
|
|
|
|
|
|
|
| |
be required, and then fix up some missing loads on overloaded-operator
paths which that exposed.
llvm-svn: 120896
|
|
|
|
|
|
| |
the l-value.
llvm-svn: 120884
|
|
|
|
|
|
|
|
| |
objects imported into blocks. //rdar://8594790.
Will have a test case coming (as well as one
sent to llvm test suite).
llvm-svn: 120713
|
|
|
|
|
|
| |
expression into the assert.
llvm-svn: 119143
|
|
|
|
|
|
|
|
| |
copy helper function and dtor of copied cxx objects
in dispose helper functions. __block variables
TBD next.
llvm-svn: 119011
|
|
|
|
|
|
| |
been marked final.
llvm-svn: 117445
|
|
|
|
|
|
| |
calls to it.
llvm-svn: 117444
|
|
|
|
|
|
| |
so that it's done in one place.
llvm-svn: 117386
|
|
|
|
|
|
| |
the patch.
llvm-svn: 117159
|
|
|
|
|
|
| |
statement expressions, //rdar: //8540501
llvm-svn: 117146
|
|
|
|
|
|
| |
member expression's base is call expr.
llvm-svn: 117127
|
|
|
|
| |
llvm-svn: 117106
|
|
|
|
|
|
| |
In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress.
llvm-svn: 115188
|
|
|
|
|
|
|
|
| |
already be determined by isCopyAssignmentOperator(), and was set too
late in the process for all clients to see the appropriate
value. Cleanup only; no functionality change.
llvm-svn: 114916
|
|
|
|
|
|
| |
helpful asserts behind.
llvm-svn: 114250
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the cleanup might not be dominated by the allocation code.
In this case, we have to store aside all the delete arguments
in case we need them later. There's room for optimization here
in cases where we end up not actually needing the cleanup in
different branches (or being able to pop it after the
initialization code).
Also make sure we only call this operator delete along the path
where we actually allocated something.
Fixes rdar://problem/8439196.
llvm-svn: 114145
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
slot. The easiest way to do that was to bundle up the information
we care about for aggregate slots into a new structure which demands
that its creators at least consider the question.
I could probably be convinced that the ObjC 'needs GC' bit should
be rolled into this structure.
Implement generalized copy elision. The main obstacle here is that
IR-generation must be much more careful about making sure that exactly
llvm-svn: 113962
|
|
|
|
| |
llvm-svn: 113863
|
|
|
|
|
|
| |
(but not if destructors associated with the full-expression throw).
llvm-svn: 113836
|
|
|
|
|
|
|
| |
reference object to a c++ member function.
fixes radar 8409336.
llvm-svn: 113602
|
|
|
|
|
|
| |
I've audited the remaining getFunctionInfo call sites.
llvm-svn: 112936
|
|
|
|
| |
llvm-svn: 112925
|
|
|
|
|
|
|
| |
to set up a destructor call, because ABIs can tweak these conventions.
Fixes rdar://problem/8386802.
llvm-svn: 112916
|
|
|
|
|
|
| |
two regressions in Boost.Config.
llvm-svn: 112908
|
|
|
|
|
|
|
| |
based on ConvertTypeForMem. Thanks to John for pointing out the right
solution.
llvm-svn: 112838
|
|
|
|
|
|
|
|
|
|
|
|
| |
complains when the element type of a C++ "delete" expression is
different from what we would expect from the pointer type. When
deleting a bool*, we end up with an i1 on one side (where we compute
the LLVM type from the Clang bool type) and i8 on the other (where we
grab the LLVM type from the LLVM pointer type). I've weakened the
assertion appropriately, and the Boost Parallel Graph Library now
passes its regression tests.
llvm-svn: 112821
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implement ARM array cookies. Also fix a few unfortunate bugs:
- throwing dtors in deletes prevented the allocation from being deleted
- adding the cookie to the new[] size was not being considered for
overflow (and, more seriously, was screwing up the earlier checks)
- deleting an array via a pointer to array of class type was not
causing any destructors to be run and was passing the unadjusted
pointer to the deallocator
- lots of address-space problems, in case anyone wants to support
free store in a variant address space :)
llvm-svn: 112814
|
|
|
|
|
|
| |
a c++ class object 'ivar'. Fixes radar 8366604.
llvm-svn: 112729
|
|
|
|
|
|
| |
under the ARM ABI.
llvm-svn: 112588
|
|
|
|
|
|
| |
semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them.
llvm-svn: 112563
|
|
|
|
|
|
| |
multiple dimensions.
llvm-svn: 112188
|
|
|
|
|
|
| |
to the new constants.
llvm-svn: 112047
|
|
|
|
|
|
| |
operator new[].
llvm-svn: 111788
|
|
|
|
|
|
|
|
|
| |
Make CGT defer to the ABI on all member pointer types.
This requires giving CGT a handle to the ABI.
It's way easier to make that work if we avoid lazily creating the ABI.
Make it so.
llvm-svn: 111786
|
|
|
|
|
|
|
|
|
|
|
|
| |
implicitly-defined default constructor, zero-initialize the memory
before calling the default constructor. Previously, we would only
zero-initialize in the case of a trivial default constructor.
Also, simplify the hideous logic that determines when we have a
trivial default constructor and, therefore, don't need to emit any
call at all.
llvm-svn: 111779
|
|
|
|
|
|
|
|
|
|
| |
pointers. I find the resulting code to be substantially cleaner, and it
makes it very easy to use the same APIs for data member pointers (which I have
conscientiously avoided here), and it avoids a plethora of potential
inefficiencies due to excessive memory copying, but we'll have to see if it
actually works.
llvm-svn: 111776
|
|
|
|
| |
llvm-svn: 111771
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 111752
|
|
|
|
|
|
|
|
| |
update callers as best I can.
- This is a work in progress, our alignment handling is very horrible / sketchy -- I am just aiming for monotonic improvement.
- Serious review appreciated.
llvm-svn: 111707
|
|
|
|
|
|
|
|
| |
trivial default constructors. We're weren't zero-initializing them,
which manifested as <rdar://problem/8320532> (a regression in the GCC
test suite) and is likely to have caused significant other breakage.
llvm-svn: 111650
|
|
|
|
|
|
|
|
|
| |
initializer of (). Make sure to use a simple memset() when we can, or
fall back to generating a loop when a simple memset will not
suffice. Fixes <rdar://problem/8212208>, a regression due to my work
in r107857.
llvm-svn: 108977
|
|
|
|
|
|
| |
doing an overflow check.
llvm-svn: 108943
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which generates more efficient and more obviously conformant
code. We now test for overflow of the multiply then force
the result to -1 if so. On X86, this generates nice code
like this:
__Z4testl: ## @_Z4testl
## BB#0: ## %entry
subl $12, %esp
movl $4, %eax
mull 16(%esp)
testl %edx, %edx
movl $-1, %ecx
cmovel %eax, %ecx
movl %ecx, (%esp)
call __Znam
addl $12, %esp
ret
llvm-svn: 108927
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
causing clang to compile this code into something that correctly throws a
length error, fixing a potential integer overflow security attack:
void *test(long N) {
return new int[N];
}
int main() {
test(1L << 62);
}
We do this even when exceptions are disabled, because it is better for the
code to abort than for the attack to succeed.
This is heavily based on a patch that Fariborz wrote.
llvm-svn: 108915
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
like this:
void *test(long N) {
return new int[N][42][42];
}
the loop generates two dead mul instructions:
%tmp = load i64* %N.addr ; <i64> [#uses=2]
%0 = mul i64 %tmp, 7056 ; <i64> [#uses=1]
%1 = mul i64 %tmp, 42 ; <i64> [#uses=1]
%2 = mul i64 %1, 42 ; <i64> [#uses=0]
%call = call noalias i8* @_Znam(i64 %0) ; <i8*> [#uses=1]
The scale of these multiplies is already handled by the typesize stuff.
llvm-svn: 108884
|
|
|
|
|
|
|
| |
EmitCXXNewAllocSize. This code uses IRBuilder, which does
constant folding already.
llvm-svn: 108882
|
|
|
|
|
|
| |
suppressing copies of objects with trivial copy constructors.
llvm-svn: 107857
|