summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Remove the vast majority of the Destroy methods from the AST library,Douglas Gregor2010-07-252-11/+0
| | | | | | since we aren't going to be calling them ever. llvm-svn: 109377
* Mangle enum constant expressions. Fixes rdar://problem/8204122John McCall2010-07-241-0/+6
| | | | llvm-svn: 109315
* Untangle filename/dirname confusion. Store constructed strings on the side. ↵Devang Patel2010-07-242-14/+40
| | | | | | | | | | | | | | | | | | | | Avoid use of Path.makeAbsolute(). DW_TAG_compile_unit uses two attributes DW_AT_name and DW_AT_comp_dir. Their expected values are: $ clang foo.c -g DW_AT_name - foo.c DW_AT_comp_dir - `pwd` $ clang one/two/foo.c -g DW_AT_name - one/two/foo.c DW_AT_comp_dir - `pwd` $ clang /tmp/one/foo.c -g DW_AT_name - /tmp/one/foo.c DW_AT_comp_dir - empty llvm-svn: 109303
* Support catching Objective C pointers in C++ under the non-fragile NeXT runtime.John McCall2010-07-244-24/+56
| | | | | | Diagnose attempts to do this under the GNU or fragile NeXT runtimes. llvm-svn: 109298
* 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
OpenPOWER on IntegriCloud