summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Return type of a setter call caused byFariborz Jahanian2010-07-241-1/+1
| | | | | | | | use of property-dot syntax using 'super' as receiver is 'void'. This fixes a bug in generating correct API for setter call. Fixes radar 8203426. llvm-svn: 109297
* Revert r109263.Devang Patel2010-07-231-15/+8
| | | | llvm-svn: 109284
* Revise cleanup IR generation to fix a major bug with cleanups (PR7686)John McCall2010-07-238-376/+801
| | | | | | | as well as some significant asymptotic inefficiencies with threading multiple jumps through deep cleanups. llvm-svn: 109274
* There is no need to use separate dir name for AT_comp_dir attribute. Using ↵Devang Patel2010-07-231-8/+15
| | | | | | absolute path for filename allows clients to query complete file location info from gdb breakpoints. Save constructed full file name. llvm-svn: 109263
* Vectors are not integer types, so the type system should not classifyDouglas Gregor2010-07-232-8/+8
| | | | | | | | | | | them as such. Type::is(Signed|Unsigned|)IntegerType() now return false for vector types, and new functions has(Signed|Unsigned|)IntegerRepresentation() cover integer types and vector-of-integer types. This fixes a bunch of latent bugs. Patch from Anton Yartsev! llvm-svn: 109229
* Keep track of artificial scopes introduced by line directives. For example,Devang Patel2010-07-224-1/+83
| | | | | | | | | | | | #line 41 "bar.c" dummy (1, i); #line 24 "bar.h" i = f2 (i); #line 44 "bar.c" This is tested by step-line.exp in gdb testsuite. llvm-svn: 109189
* Turn off EH cleanups for __block variables; they caused some internal buildbotJohn McCall2010-07-221-1/+3
| | | | | | failures. There's a radar tracking this. llvm-svn: 109170
* atch for implementation of objective-c's -WselectorFariborz Jahanian2010-07-221-2/+2
| | | | | | | warning flag in clang. Little more to do for a PCH issue. Radar 6507158. llvm-svn: 109129
* ObjCId is special "struct objc_object". Make this explicit in debug info.Devang Patel2010-07-211-0/+6
| | | | | | This is tested by objc-rbreak.exp in gdb testsuite. llvm-svn: 109050
* Fix regression caused by r108911.Devang Patel2010-07-211-1/+2
| | | | | | | Do not override known debug loc with unknown debug loc. This is tested by sections.exp in gdb testsuite. llvm-svn: 109022
* Don't crash when sending a message inside a block with the non-fragile ABI ↵David Chisnall2010-07-211-1/+1
| | | | | | (GNU runtime). llvm-svn: 109012
* Mark the load after calling objc_msg_lookup_sender() so that it doesn't get ↵David Chisnall2010-07-211-2/+2
| | | | | | optimised away (GNU runtime). llvm-svn: 109010
* Rename LazyCleanup -> Cleanup. No functionality change for these last threeJohn McCall2010-07-2110-178/+173
| | | | | | commits. llvm-svn: 109000
* Rip out EHCleanupScope.John McCall2010-07-214-296/+13
| | | | llvm-svn: 108999
* Kill the CleanupBlock API.John McCall2010-07-212-84/+0
| | | | llvm-svn: 108998
* Switch the fragile-ABI @finally/@synchronized cleanup over to using a lazyJohn McCall2010-07-211-32/+53
| | | | | | cleanup. llvm-svn: 108997
* Code simplification.John McCall2010-07-211-14/+4
| | | | llvm-svn: 108996
* Switch the main possibly-conditional temporary cleanup over to being lazy.John McCall2010-07-211-33/+37
| | | | llvm-svn: 108995
* Switch the destructor for a temporary arising from a reference binding over toJohn McCall2010-07-213-12/+14
| | | | | | using a lazy cleanup. llvm-svn: 108994
* Switch the __cxa_guard_abort cleanup to being a lazy cleanup.John McCall2010-07-211-5/+17
| | | | llvm-svn: 108993
* Switch some random local-decl cleanups over to using lazy cleanups. Turn onJohn McCall2010-07-211-52/+57
| | | | | | | the block-release unwind cleanup: we're never going to test it if we don't turn it on. llvm-svn: 108992
* Switch finally cleanups over to being lazy cleanups. We get basically nothingJohn McCall2010-07-212-46/+70
| | | | | | | from the laziness features here except better block ordering, but it removes yet another CleanupBlock use. llvm-svn: 108990
* Implement proper base/member destructor EH chaining.John McCall2010-07-212-156/+175
| | | | llvm-svn: 108989
* Change PushDestructorCleanup to use lazy cleanups.John McCall2010-07-211-8/+16
| | | | llvm-svn: 108979
* Convert the EH cleanups for base and member destructors in a constructor intoJohn McCall2010-07-211-18/+42
| | | | | | lazy cleanups. llvm-svn: 108978
* Implement zero-initialization for array new when there is anDouglas Gregor2010-07-213-21/+82
| | | | | | | | | 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
* Convert the end-catch call for finally blocks to a lazy cleanup. This kills offJohn McCall2010-07-211-13/+25
| | | | | | the last of the shared-code cleanups. llvm-svn: 108975
* Convert the ObjC @synchronized cleanups to laziness. This is not actuallyJohn McCall2010-07-212-13/+32
| | | | | | | a big deal, except that I want to eliminate the shared-code EH cleanups in preparation for a significant algorithmic fix. llvm-svn: 108973
* Add a little helper method which will be useful soon.John McCall2010-07-211-0/+4
| | | | llvm-svn: 108972
* Remove unintended code that was checked in as part of r108916.Devang Patel2010-07-201-12/+0
| | | | llvm-svn: 108951
* Remove unused argument.Devang Patel2010-07-204-13/+13
| | | | llvm-svn: 108946
* Fix the IR generation for catching pointers by references.John McCall2010-07-202-2/+59
| | | | | | Fixes <rdar://problem/8212123>. llvm-svn: 108944
* in 'new int[4]', constant fold the 4*4=16 instead of Chris Lattner2010-07-201-34/+56
| | | | | | doing an overflow check. llvm-svn: 108943
* Follow the implementation approach suggested by PR6687,Chris Lattner2010-07-203-49/+18
| | | | | | | | | | | | | | | | | | | | | | 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
* Adopt objc_assign_threadlocal() for __thread variables of GC types.Fariborz Jahanian2010-07-205-17/+57
| | | | | | Implements radar 8203301. llvm-svn: 108917
* Print template argument names for template class.Devang Patel2010-07-202-1/+57
| | | | llvm-svn: 108916
* implement rdar://5739832 - operator new should check for overflow in multiply,Chris Lattner2010-07-204-11/+68
| | | | | | | | | | | | | | | | | | | | 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
* Use getDebugLoc and setDebugLoc instead of getDbgMetadata and setDbgMetadata,Dan Gohman2010-07-201-4/+3
| | | | | | avoiding MDNode overhead. llvm-svn: 108911
* delete a loop that just generates dead code. In an exampleChris Lattner2010-07-201-10/+0
| | | | | | | | | | | | | | | | | | | | 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
* remove the special case for constant array sizes from Chris Lattner2010-07-201-24/+2
| | | | | | | EmitCXXNewAllocSize. This code uses IRBuilder, which does constant folding already. llvm-svn: 108882
* Re-apply fixed version of 108749, correctly conditionalizing the new sections onJim Grosbach2010-07-201-5/+15
| | | | | | ObjC ABI version 2 this time. llvm-svn: 108847
* Update ImplicitCastExpr to be able to represent an XValue.Sebastian Redl2010-07-202-3/+4
| | | | llvm-svn: 108807
* Correct line info for declarations/definitions. Radar 8063111.Stuart Hastings2010-07-191-0/+1
| | | | llvm-svn: 108785
* Temporarily revert. Some odd internal breakage is likely related.Jim Grosbach2010-07-191-4/+4
| | | | llvm-svn: 108764
* Put ObjC method names, method types and class names in separate string literalJim Grosbach2010-07-191-4/+4
| | | | | | sections. rdar://8207705 llvm-svn: 108749
* Fix mangling for static member variables of classes inside an extern "C"Eli Friedman2010-07-181-0/+4
| | | | | | | linkage specification. Not sure if this is the ideal fix, but I'm reasonably sure it's correct vs. gcc. llvm-svn: 108656
* Improve the representation of the atomic builtins in a few ways. First, we makeChandler Carruth2010-07-181-30/+86
| | | | | | | | | | | | | | | 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
* BUILD_ARCHIVE is the default for libraries, no need to set it.Chris Lattner2010-07-181-1/+0
| | | | llvm-svn: 108633
* Fix crash initializing a bit-field with a non-constant in a place where weEli Friedman2010-07-171-4/+3
| | | | | | try to evaluate the initializer as a constant. llvm-svn: 108632
* The GNU-runtime ObjC personality function doesn't let us rethrow with URR forJohn McCall2010-07-172-43/+92
| | | | | | multiple reasons. Rethrow with _objc_exception_throw instead. Fixes PR7656. llvm-svn: 108595
OpenPOWER on IntegriCloud