summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjCXX
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* RHS of property expression assignment requiresFariborz Jahanian2010-09-141-0/+34
| | | | | | | copy initialization before passing it to a setter. Fixes radar 8427922. llvm-svn: 113885
* IRGen fix for using property-dot syntax to pass Fariborz Jahanian2010-09-101-0/+18
| | | | | | | reference object to a c++ member function. fixes radar 8409336. llvm-svn: 113602
* property reference expression used on lhs of assignmentFariborz Jahanian2010-09-091-0/+19
| | | | | | | | follows objective's semantics and is not overload'able with an assignment operator. Fixes a crash and a missing diagnostics. Radar 8379892. llvm-svn: 113555
* Fix IRGen when property-dot syntax used to accessFariborz Jahanian2010-09-011-0/+8
| | | | | | a c++ class object 'ivar'. Fixes radar 8366604. llvm-svn: 112729
* Just disable the hidden-visibility optimization for now by hiding it behindJohn McCall2010-08-121-7/+7
| | | | | | | | a -cc1 option. The Darwin linker complains about mixed visibility when linking gcc-built objects with clang-built objects, and the optimization isn't really that valuable. Platforms with less ornery linkers can feel free to enable this. llvm-svn: 110979
* Implement RTTI generation for Objective C types. Fixes PR7864.John McCall2010-08-121-0/+52
| | | | llvm-svn: 110900
* Allow reference binding of a reference of Objective-C object type toDouglas Gregor2010-08-071-0/+19
| | | | | | | | an lvalue of another, compatible Objective-C object type (e.g., a subclass). Introduce a new initialization sequence step kind to describe this binding, along with a new cast kind. Fixes PR7741. llvm-svn: 110513
* Support catching Objective C pointers in C++ under the non-fragile NeXT runtime.John McCall2010-07-241-0/+17
| | | | | | Diagnose attempts to do this under the GNU or fragile NeXT runtimes. llvm-svn: 109298
* When checking whether to bind an expression to a temporary, don't bind Obj-C ↵Anders Carlsson2010-07-161-0/+1
| | | | | | message send expressions who call methods that return references. llvm-svn: 108559
* extern variable declared locally to objective-c++ methodFariborz Jahanian2010-06-301-0/+14
| | | | | | should not be mangled either. Fixes radar 8016412. llvm-svn: 107303
* Renamed selactor-expr-lvalue.mm to selector-expr-lvalue.mm.Fariborz Jahanian2010-06-241-0/+0
| | | | | | Thanks Daniel D. llvm-svn: 106758
OpenPOWER on IntegriCloud