| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Do not override known debug loc with unknown debug loc.
This is tested by sections.exp in gdb testsuite.
llvm-svn: 109022
|
| |
|
|
|
|
| |
(GNU runtime).
llvm-svn: 109012
|
| |
|
|
|
|
| |
optimised away (GNU runtime).
llvm-svn: 109010
|
| |
|
|
|
|
| |
commits.
llvm-svn: 109000
|
| |
|
|
| |
llvm-svn: 108999
|
| |
|
|
| |
llvm-svn: 108998
|
| |
|
|
|
|
| |
cleanup.
llvm-svn: 108997
|
| |
|
|
| |
llvm-svn: 108996
|
| |
|
|
| |
llvm-svn: 108995
|
| |
|
|
|
|
| |
using a lazy cleanup.
llvm-svn: 108994
|
| |
|
|
| |
llvm-svn: 108993
|
| |
|
|
|
|
|
| |
the block-release unwind cleanup: we're never going to test it if we don't turn
it on.
llvm-svn: 108992
|
| |
|
|
|
|
|
| |
from the laziness features here except better block ordering, but it removes yet
another CleanupBlock use.
llvm-svn: 108990
|
| |
|
|
| |
llvm-svn: 108989
|
| |
|
|
| |
llvm-svn: 108979
|
| |
|
|
|
|
| |
lazy cleanups.
llvm-svn: 108978
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
the last of the shared-code cleanups.
llvm-svn: 108975
|
| |
|
|
|
|
|
| |
a big deal, except that I want to eliminate the shared-code EH cleanups
in preparation for a significant algorithmic fix.
llvm-svn: 108973
|
| |
|
|
| |
llvm-svn: 108972
|
| |
|
|
| |
llvm-svn: 108951
|
| |
|
|
| |
llvm-svn: 108946
|
| |
|
|
|
|
| |
Fixes <rdar://problem/8212123>.
llvm-svn: 108944
|
| |
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Implements radar 8203301.
llvm-svn: 108917
|
| |
|
|
| |
llvm-svn: 108916
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
avoiding MDNode overhead.
llvm-svn: 108911
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
ObjC ABI version 2 this time.
llvm-svn: 108847
|
| |
|
|
| |
llvm-svn: 108807
|
| |
|
|
| |
llvm-svn: 108785
|
| |
|
|
| |
llvm-svn: 108764
|
| |
|
|
|
|
| |
sections. rdar://8207705
llvm-svn: 108749
|
| |
|
|
|
|
|
| |
linkage specification. Not sure if this is the ideal fix, but I'm reasonably
sure it's correct vs. gcc.
llvm-svn: 108656
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
their call expressions synthetically have the "deduced" types based on their
first argument. We only insert conversions in the AST for arguments whose
values require conversion to match the value type expected. This keeps PR7600
closed by maintaining the return type, but avoids assertions due to unexpected
implicit casts making the type unsigned (test case added from Daniel).
The magic is moved into the codegen for the atomic builtin which inserts the
casts as needed at the IR level to raise the type to an integer suitable for
the LLVM intrinsic. This shouldn't cause any real change in functionality, but
now we can make the builtin be more truly polymorphic.
llvm-svn: 108638
|
| |
|
|
| |
llvm-svn: 108633
|
| |
|
|
|
|
| |
try to evaluate the initializer as a constant.
llvm-svn: 108632
|
| |
|
|
|
|
| |
multiple reasons. Rethrow with _objc_exception_throw instead. Fixes PR7656.
llvm-svn: 108595
|
| |
|
|
|
|
| |
asm operand twice.
llvm-svn: 108489
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- This issue here is that /usr/include/Blocks.h wants to define some of the
block runtime globals as weak, depending on the target. This doesn't work in
Clang because we aren't using the AST decl for these globals.
- The fix is a pretty gross hack which just watches all the decls for the
specific blocks globals we need to know about; if we see one we use it,
otherwise we use the hand coded type.
In time, I would like to clean this up by changing IRgen to ask Sema/AST for
the decl, which would then be lazily loaded from the builtin table if
necessary. This could be used in a whole host of places in IRgen and would
get rid of a lot of grotty hand coding of LLVM IR; however, we need some
extra Sema support for this as well as support for builtin global variables.
llvm-svn: 108482
|
| |
|
|
| |
llvm-svn: 108481
|
| |
|
|
|
|
|
| |
the order they appeared in the translation unit. If they get emitted, put them
in their proper order. Fixes rdar://problem/7458115
llvm-svn: 108477
|
| |
|
|
|
|
| |
codegenerator preserve info in case the symbol is deleted.
llvm-svn: 108471
|
| |
|
|
|
|
| |
with always_inline attribute. Thanks to Howard for the tip.
llvm-svn: 108469
|
| |
|
|
|
|
| |
Tested by namespace.exp and virtfunc.exp from gdb testsuite.
llvm-svn: 108468
|
| |
|
|
|
|
| |
for string literals.
llvm-svn: 108464
|
| |
|
|
|
|
|
|
|
| |
with the proper spelling of "non-class prvalue". Silly me, I think
class rvalues were xvalues rather than prvalues!
Hah hah hah.
llvm-svn: 108443
|