summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Debug info bug fix, function start wasn't getting generated correctlyDaniel Dunbar2008-10-181-8/+2
| | | | | | for Obj-C methods. llvm-svn: 57769
* silence release-assert warnings.Chris Lattner2008-10-121-3/+3
| | | | llvm-svn: 57392
* Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when ↵Ted Kremenek2008-10-061-3/+3
| | | | | | processing the Decl of an Objective-C foreach statement. llvm-svn: 57209
* Implement Obj-C synthesized setters for copy / retain.Daniel Dunbar2008-09-241-22/+63
| | | | llvm-svn: 56547
* Implement Obj-C getter synthesis for copy and retain.Daniel Dunbar2008-09-241-12/+56
| | | | | | Also, "simple" getter synthesis no longer uses temporary AST objects. llvm-svn: 56544
* Make sure to store the exception in the catch parameter.Anders Carlsson2008-09-111-8/+0
| | | | llvm-svn: 56102
* Make sure to emit the catch parameter as well as the catch body.Anders Carlsson2008-09-111-0/+8
| | | | llvm-svn: 56101
* Factor CodeGenFunction::StartFunction out of GenerateCode andDaniel Dunbar2008-09-091-41/+11
| | | | | | StartObjCMethod. llvm-svn: 56030
* Use a unified return block.Daniel Dunbar2008-09-091-0/+5
| | | | | | | - For the time being this means our emitted code is somewhat worse, especially for aggregates. This will be fixed. llvm-svn: 56013
* Move handling of @try and @throw to the runtime class.Anders Carlsson2008-09-091-0/+10
| | | | llvm-svn: 55983
* Change CodeGen to emit calls using (RValue,Type) list:Daniel Dunbar2008-09-091-5/+6
| | | | | | | | | | | | | | - Add CodeGenFunction::EmitAnyExprToTemp o Like EmitAnyExpr, but emits aggregates to a temporary location if none is available. Seems like this should be simpler (even aside from using first class aggregates). - Killed CodeGenFunction::EmitCallArg (just append the pair) - Conversion of RValues to actual call arguments is now isolated in CodeGenFunction::EmitCall. llvm-svn: 55970
* Set function attributes (sext, zext, etc.) on Objective-C methods.Daniel Dunbar2008-09-041-0/+3
| | | | llvm-svn: 55812
* Fix infinite loop in for ... in code generation.Daniel Dunbar2008-09-041-1/+1
| | | | | | - Patch via Thomas Clement, thanks! llvm-svn: 55804
* Fix ObjCPropertRefExpr to be able to encode all the information forDaniel Dunbar2008-09-031-8/+18
| | | | | | | uses which refer to methods not properties. - Not yet wired in Sema. llvm-svn: 55681
* Handle mutation while enumerating correctly. Fix some bugs.Anders Carlsson2008-08-311-7/+48
| | | | llvm-svn: 55583
* Initial support for CodeGen of for ... in statements.Anders Carlsson2008-08-311-1/+151
| | | | llvm-svn: 55580
* Stub out CodeGenFunction::EmitObjCForCollectionStmt.Anders Carlsson2008-08-301-0/+6
| | | | | | Add CodeGenFunction::EmitMemSetToZero and make AggExprEmitter::EmitAggregateClear use it. llvm-svn: 55573
* Add Objective-C property setter support.Daniel Dunbar2008-08-301-12/+22
| | | | | | | | | | | | | | | | | | | | | | - Change Obj-C runtime message API, drop the ObjCMessageExpr arg in favor of just result type and selector. Necessary so it can be reused in situations where we don't want to cons up an ObjCMessageExpr. - Update aggregate binary assignment to know about special property ref lvalues. - Add CodeGenFunction::EmitCallArg overload which takes an already emitted rvalue. Add CodeGenFunction::StoreComplexIntoAddr. Disabled logic in Sema for parsing Objective-C dot-syntax that accesses methods. This code does not search in the correct order and the AST node has no way of properly representing its results. Updated StmtDumper to print a bit more information about ObjCPropertyRefExprs. llvm-svn: 55561
* Refactor handling of calls:Daniel Dunbar2008-08-301-2/+8
| | | | | | | | | | | | | | | | - Added CodeGenFunction::EmitCall which just takes the callee, return type, and a list of (Value*,QualType) pairs. - Added CodeGenFunction::EmitCallArg which handles emitting code for a call argument and turning it into an appropriate (Value*,QualType) pair. - Changed Objective-C runtime interface so that the actual emission of arguments for message sends is (once again) done in the code to emit a message send. No intended functionality change, this is prep work for better ABI support and for Objective-C property setter support. llvm-svn: 55560
* Add special "property reference" CodeGen::LValue type for emittingDaniel Dunbar2008-08-291-0/+6
| | | | | | | | Objective-C property references. - This handles property references "more correctly" but setters still don't work. llvm-svn: 55534
* Initial support for Obj-C dot-syntax for getters.Daniel Dunbar2008-08-271-0/+20
| | | | llvm-svn: 55410
* Objective-C @synthesize support.Daniel Dunbar2008-08-261-4/+86
| | | | | | | | | | | - Only supports simple assignment and atomic semantics are ignored. - Not quite usable yet because the methods do not actually get added to the class metadata. - Added ObjCPropertyDecl::getSetterKind (one of Assign, Copy, Retain). - Rearrange CodeGenFunction so synthesis can reuse function prolog / epilog code. llvm-svn: 55365
* Fix Obj-C super sends inside class methods.Daniel Dunbar2008-08-251-6/+10
| | | | | | | - NeXT loads the super class at runtime; this required changing the runtime interface to pass more information down. llvm-svn: 55307
* Trim CGObjCRuntime::GenerateMessageSend[Super]Daniel Dunbar2008-08-231-29/+5
| | | | | | | | | | | | | | | | | | - Returns an RValue. - Reduced to only taking the CodeGenFunction, Expr, and Receiver. - Becomes responsible for emitting the arguments. Add CodeGenFunction::EmitCallExprExt - Takes optional extra arguments to insert at the head of the call. - This allows the Obj-C runtimes to call into this and isolates the argument and call instruction generation code to one place. Upshot is that we now pass structures (more) correctly. Also, fix one aspect of generating methods which take structure arguments (for NeXT). This probably needs to be merged with the SetFunctionAttributes code in CodeGenModule.cpp llvm-svn: 55223
* Move all Obj-C runtime interaction into CodeGenFunction.Daniel Dunbar2008-08-201-0/+5
| | | | | | | - Drop duplicate (and broken) code for sending messages. - Add EmitObjCProtocolExpr to CodeGenFunction. llvm-svn: 55024
* Add NeXT runtime support for generating methods.Daniel Dunbar2008-08-161-26/+12
| | | | | | | | | | | | | Change CodeGenFunction::EmitParmDecl to take either a ParmVarDecl or an ImplicitParamDecl. Drop hasAggregateLLVMType from CodeGenModule.cpp (use version in CodeGenFunction). Change the Objective-C method generation to use EmitParmDecl for implicit parameters. llvm-svn: 54838
* Change ObjCRuntime::LookupClass -> GetClass, and now takes theDaniel Dunbar2008-08-161-9/+12
| | | | | | | | | | | | | ObjCInterfaceDecl. Change ObjCRuntime::GenerateMessageSendSuper to take the ObjCInterfaceDecl for the super class, instead of just its name. Change EmitObjCMessageExpr to make the right runtime calls for super sends in class methods (i.e. a super send with the class object as the receiver). llvm-svn: 54833
* Change CGObjCRuntime methods to take appropriate clang Decls.Daniel Dunbar2008-08-151-27/+1
| | | | | | | | | - This is in prep for implementation class support for the NeXT runtime, for which the existing methods don't provide enough information (and additionally make too many assumptions about how things should be emitted). llvm-svn: 54824
* Add GetAddrOfConstantCString methodDaniel Dunbar2008-08-131-1/+1
| | | | | | | | | | | | | | | | | | - Returns addr of constant for argument + '\0'. - I couldn't think of a better name. - Move appropriate users of GetAddrOfConstantString to this. Rename getStringForStringLiteral to GetStringForStringLiteral. Add GetAddrOfConstantStringFromLiteral - This combines GetAddrOfConstantString and GetStringForStringLiteral. This method can be, but is not yet, more efficient. Change GetAddrOfConstantString to not add terminating '\0' - <rdar://problem/6140956> llvm-svn: 54768
* Drop Sender from GenerateMessageSend*Daniel Dunbar2008-08-121-3/+2
| | | | | | | | | - Was unused and generated a unnecessary load of self Update NeXT runtime to get proper object & selector types from ASTContext. llvm-svn: 54667
* Add ObjC constant string support for NeXT.Daniel Dunbar2008-08-121-3/+4
| | | | | | | | | | Changed CGObjCRuntime::GenerateConstantString interface to take std::string instead of char* and size. Change ObjC functions which call on GenerateConstantString to bitcast result to appropriate type. llvm-svn: 54659
* Change CodeGenModule to only create ObjC runtime for ObjC filesDaniel Dunbar2008-08-111-7/+7
| | | | | | | - Changed CodeGenModule::getObjCRuntime to return reference. - Added CodeGenModule::hasObjCRuntime predicate. llvm-svn: 54645
* More #include cleaningDaniel Dunbar2008-08-111-4/+0
| | | | | | | | | | | - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. llvm-svn: 54632
* More #include cleaningDaniel Dunbar2008-08-111-0/+2
| | | | | | | | - Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h - Moved Sema::getCurMethodDecl() out of line (dependent on ObjCMethodDecl via dyn_cast). llvm-svn: 54629
* rename PreDefinedExpr -> PredefinedExprChris Lattner2008-08-101-3/+3
| | | | llvm-svn: 54605
* avoid a lot of unneeded selector processing work by passing aroundChris Lattner2008-06-261-8/+3
| | | | | | selectors instead of Value*'s. llvm-svn: 52760
* use cheaper/simpler getselector call for @selector exprs.Chris Lattner2008-06-261-2/+1
| | | | llvm-svn: 52759
* start avoid doing lots of unneeded work handling selectorsChris Lattner2008-06-261-1/+1
| | | | llvm-svn: 52758
* Fix 80 col violations, assert on assumptions.Chris Lattner2008-06-261-7/+11
| | | | llvm-svn: 52755
* "Support for Objective-C message sends which return structures. Also ↵Chris Lattner2008-06-241-2/+81
| | | | | | | | includes a small fix for constant string handling that should have been in the last patch (sorry!) and a hook for generating selectors (rest of this implementation to follow in the next patch)." Patch by David Chisnall! llvm-svn: 52681
* Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.Chris Lattner2008-06-171-0/+89
| | | | | | Patch by David Chisnall! llvm-svn: 52422
* - Move ObjC Expresssion AST's from Expr.h => ExprObjC.hSteve Naroff2008-05-291-1/+1
| | | | | | - #include ExprObjC.h in many places llvm-svn: 51703
* The dtor CGObjCRuntime::~CGObjCRuntime() was implemented twice, onceTed Kremenek2008-04-091-1/+2
| | | | | | | in CGObjCGNU.cpp and once in CGObjCEtoile.cpp. Moved its definition to CGObjC.cpp. This resolves a build error in Xcode, and also cleans things up. llvm-svn: 49429
* Add initial support for objc codegen for methods, ivars, and theChris Lattner2008-03-301-0/+1
| | | | | | etoile runtime, patch by David Chisnall! llvm-svn: 48969
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-0/+25
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
OpenPOWER on IntegriCloud