summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjCXX
Commit message (Collapse)AuthorAgeFilesLines
* Okay, that rule about zero-length arrays applies to destroyingJohn McCall2011-07-131-2/+2
| | | | | | them, too. llvm-svn: 135038
* Switch delete[] IR-generation over to the destroy framework,John McCall2011-07-131-8/+17
| | | | | | which implicitly makes it EH-safe as well. llvm-svn: 135025
* Switch field destruction over to use the new destroyer-based APIJohn McCall2011-07-121-4/+11
| | | | | | and kill a lot of redundant code. llvm-svn: 134988
* Fix the clang bootstrap and Jay's testcase from llvm-dev by being completelyChris Lattner2011-07-101-4/+4
| | | | | | | | | | conservative when converting a functiontype to IR when in a "pointer within a struct" context. This has the unfortunate sideeffect of compiling all function pointers inside of structs into "{}*" which, though correct, is ugly. This has the positive side effect of being correct, and it is pretty straight-forward to improve on this. llvm-svn: 134861
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-092-4/+5
| | | | llvm-svn: 134831
* In ARC, reclaim all return values of retainable type, not just thoseJohn McCall2011-07-071-8/+12
| | | | | | | | | | | | where we have an immediate need of a retained value. As an exception, don't do this when the call is made as the immediate operand of a __bridge retain. This is more in the way of a workaround than an actual guarantee, so it's acceptable to be brittle here. rdar://problem/9504800 llvm-svn: 134605
* Change the driver's logic about Objective-C runtimes: abstract out aJohn McCall2011-07-065-5/+5
| | | | | | | | | | | | structure to hold inferred information, then propagate each invididual bit down to -cc1. Separate the bits of "supports weak" and "has a native ARC runtime"; make the latter a CodeGenOption. The tool chain is still driving this decision, because it's the place that has the required deployment target information on Darwin, but at least it's better-factored now. llvm-svn: 134453
* Do not apply the ARC move optimization to 'const'-qualified xvalues.John McCall2011-06-251-0/+12
| | | | llvm-svn: 133861
* Support for catching objc pointer objects in c++ catch-statementFariborz Jahanian2011-06-231-1/+16
| | | | | | in fragile abi mode and some other cleanups. // rdar://8940528 llvm-svn: 133747
* Alloa catching Objective-C id's being thrown with C++ throwFariborz Jahanian2011-06-221-0/+33
| | | | | | in Darwin's fragile abi mode. // rdar://8940528 llvm-svn: 133639
* Implement the C++0x move optimization for Automatic Reference CountingDouglas Gregor2011-06-221-0/+63
| | | | | | | | objects, so that we steal the retain count of a temporary __strong pointer (zeroing out that temporary), eliding a retain/release pair. Addresses <rdar://problem/9364932>. llvm-svn: 133621
* When binding a reference to an Automatic Reference Counting temporary,Douglas Gregor2011-06-221-0/+30
| | | | | | | | | retain/release the temporary object appropriately. Previously, we would only perform the retain/release operations when the reference would extend the lifetime of the temporary, but this does the wrong thing across calls. llvm-svn: 133620
* Fix regression with @encode string. rdar://9624314.Argyrios Kyrtzidis2011-06-171-0/+14
| | | | llvm-svn: 133312
* Objective-C++ ARC: do not mangle __unsafe_unretained lifetimeDouglas Gregor2011-06-171-2/+2
| | | | | | | | | | qualifiers, so that an __unsafe_unretained-qualified type T in ARC code will have the same mangling as T in non-ARC code, improving ABI interoperability. This works now because we infer or require a lifetime qualifier everywhere one can appear in an external interface. Another part of <rdar://problem/9595486>. llvm-svn: 133306
* Be sure to try a final ARC-production even in Objective-C++.John McCall2011-06-161-0/+10
| | | | llvm-svn: 133215
* Restore correct use of GC barriers.John McCall2011-06-161-0/+20
| | | | llvm-svn: 133144
* Automatic Reference Counting.John McCall2011-06-158-0/+544
| | | | | | | | | | Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
* Implement support for C++11 in-class initialization of non-static data members.Richard Smith2011-06-111-1/+17
| | | | llvm-svn: 132878
* Don't add objc method name mangling to locally declared function.Fariborz Jahanian2011-06-091-0/+12
| | | | | | // rdar://9566314 llvm-svn: 132791
* When inferring the result type of a block based on a return statementDouglas Gregor2011-06-051-1/+38
| | | | | | | | with a type-dependent expression, infer the placeholder type 'Context.DependentTy' to indicate that this is just a placeholder. Fixes PR9982 / <rdar://problem/9486685>. llvm-svn: 132657
* For calls returning first-class aggregates, store by element instead of ↵Eli Friedman2011-05-171-1/+6
| | | | | | creating aggregate stores in common cases. This is more friendly to fast-isel. llvm-svn: 131490
* Reapply the commits that r131401 reverted and add a fix for PR9927.Argyrios Kyrtzidis2011-05-172-18/+70
| | | | llvm-svn: 131446
* Add test for PR9927.Rafael Espindola2011-05-161-0/+18
| | | | llvm-svn: 131403
* Revert 131377, 131369 and 131365.Rafael Espindola2011-05-161-57/+0
| | | | | | 131365 caused PR9927. llvm-svn: 131401
* Create proper Objective-C @encoding for C++ classes; fixes rdar://9357400.Argyrios Kyrtzidis2011-05-141-0/+57
| | | | | | | | | | | | | | | | | | Go through and expand the members of bases into the encoding string (and encode the VTable as well). Unlike gcc which expands virtual bases as many times as they appear in the hierarchy, clang will only expand them once at the end, to reflect the actual layout. Note that there doesn't seem to be a way to indicate in the encoding that packing/alignment of members is different that normal, in which case the encoding will be out-of-sync with the real layout. If the runtime switches to just consider the size of types without taking into account alignment, we could easily make padding explicit in the encoding (e.g. using arrays of chars). The encoding strings would be longer then though. Also encode a flexible array member as array of 0 size, like gcc, not as a pointer. llvm-svn: 131365
* When instantiating a block expression, the instantiatedFariborz Jahanian2011-05-051-0/+34
| | | | | | | blockScopeInfo's CapturesCXXThis field need get set as well. // rdar://9362021. John M. please review. llvm-svn: 130930
* Warn for any kind of initialization if initializer does notFariborz Jahanian2011-04-081-1/+1
| | | | | | | implement lhs's protocols. // rdar://9091389. llvm-svn: 129142
* Fix IRGen issues related to using property-dot syntaxFariborz Jahanian2011-03-301-0/+34
| | | | | | for prperty reference types. // rdar://9208606. llvm-svn: 128551
* The emission of an Objective-C++'s class .cxx_destruct method should beJohn McCall2011-03-221-0/+18
| | | | | | | conditioned on whether it has any destructible ivars, not on whether it has any non-trivial class-object initializers. llvm-svn: 128074
* IRGen. Fix IR when message returns reference type.Fariborz Jahanian2011-03-021-0/+20
| | | | | | // rdar://8604515. llvm-svn: 126869
* Revert r126678.Fariborz Jahanian2011-02-282-4/+4
| | | | llvm-svn: 126685
* objc IRGen for Next runtime message API.Fariborz Jahanian2011-02-282-4/+4
| | | | | | | | | | The prototype for objc_msgSend() is technically variadic - `id objc_msgSend(id, SEL, ...)`. But all method calls should use a prototype that matches the method, not the prototype for objc_msgSend itself(). // rdar://9048030 llvm-svn: 126678
* Add -fcxx-exceptions to all tests that use C++ exceptions.Anders Carlsson2011-02-281-1/+1
| | | | llvm-svn: 126599
* Implement objective-c++'s block pointer type matching involvingFariborz Jahanian2011-02-121-0/+30
| | | | | | | types which are contravariance in argument types and covariance in return types. // rdar://8979379. llvm-svn: 125445
* A few more tweaks to the blocks AST representation: John McCall2011-02-071-33/+40
| | | | | | | | | | | | | | | | | - BlockDeclRefExprs always store VarDecls - BDREs no longer store copy expressions - BlockDecls now store a list of captured variables, information about how they're captured, and a copy expression if necessary With that in hand, change IR generation to use the captures data in blocks instead of walking the block independently. Additionally, optimize block layout by emitting fields in descending alignment order, with a heuristic for filling in words when alignment of the end of the block header is insufficient for the most aligned field. llvm-svn: 125005
* Move unnamed_addr after the function arguments on Sabre's request.Rafael Espindola2011-01-251-1/+1
| | | | llvm-svn: 124210
* Mark VTables and RTTI data linkonce_odr instead of weak_odr, with the ↵Anders Carlsson2011-01-241-7/+7
| | | | | | | | exception of explicit template instantiations, which have to be weak_odr. This fixes PR6996. llvm-svn: 124089
* Generate write-barriers for global objcFariborz Jahanian2011-01-131-0/+29
| | | | | | assigns. // rdar://8761767 llvm-svn: 123391
* Set unnamed_addr in every type info.Rafael Espindola2011-01-111-7/+7
| | | | llvm-svn: 123293
* Add unnamed_addr to constructors and destructors.Rafael Espindola2011-01-111-1/+1
| | | | llvm-svn: 123197
* Test case.John McCall2010-12-071-0/+3
| | | | llvm-svn: 121194
* Although we currently have explicit lvalue-to-rvalue conversions, they'reJohn McCall2010-12-041-0/+21
| | | | | | | | | | | | | | | | | | | not actually frequently used, because ImpCastExprToType only creates a node if the types differ. So explicitly create an ICE in the lvalue-to-rvalue conversion code in DefaultFunctionArrayLvalueConversion() as well as several other new places, and consistently deal with the consequences throughout the compiler. In addition, introduce a new cast kind for loading an ObjCProperty l-value, and make sure we emit those nodes whenever an ObjCProperty l-value appears that's not on the LHS of an assignment operator. This breaks a couple of rewriter tests, which I've x-failed until future development occurs on the rewriter. Ted Kremenek kindly contributed the analyzer workarounds in this patch. llvm-svn: 120890
* Fix a bug where write-barriers for assignment through referenceFariborz Jahanian2010-11-181-0/+20
| | | | | | | types was not being generated for objc pointers. // rdar://8681766. llvm-svn: 119751
* Add an assertion, fix a whole bunch of bugs, comment the assertionJohn McCall2010-11-181-2/+8
| | | | | | out because there are still bugs left. llvm-svn: 119722
* Adding couple of Block API, a bug fix andFariborz Jahanian2010-11-111-0/+150
| | | | | | a test change, all for blocks. wip. llvm-svn: 118745
* Fix a crash encoding ivars of vector types and Fariborz Jahanian2010-10-071-0/+12
| | | | | | to match gcc's encoding. Fixes //rdar: // 8519948. llvm-svn: 115980
* Copying result of object property reference expressionFariborz Jahanian2010-09-271-1/+3
| | | | | | | into a temporary is elidable as well. (Finishes up radar 8291337). llvm-svn: 114845
* Fix a NYI in IRGen which was due to incorrect ASTFariborz Jahanian2010-09-251-0/+36
| | | | | | | for property reference expression (of c++ object type) in the conditional expression. Fixes // rdar://8291337 llvm-svn: 114783
* Fixes IRgen bug in objc++ reference binding of aFariborz Jahanian2010-09-181-0/+20
| | | | | | | getter expression. Fixes // rdar://8437240 llvm-svn: 114299
* Only assignment operator triggers property setter call.Fariborz Jahanian2010-09-171-0/+34
| | | | | | Fixes radar 8437253. llvm-svn: 114207
OpenPOWER on IntegriCloud