summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove "NextDecl" from RecordDecl. This change touches many files that ↵Ted Kremenek2008-09-051-1/+1
| | | | | | | | where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration. The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType. llvm-svn: 55821
* NeXT: Emit lazy reference to Protocol class for forward protocolDaniel Dunbar2008-09-041-0/+5
| | | | | | references (to match gcc). llvm-svn: 55760
* Fix ObjCPropertRefExpr to be able to encode all the information forDaniel Dunbar2008-09-031-3/+2
| | | | | | | 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-0/+19
| | | | llvm-svn: 55583
* Add Objective-C property setter support.Daniel Dunbar2008-08-301-13/+17
| | | | | | | | | | | | | | | | | | | | | | - 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-23/+60
| | | | | | | | | | | | | | | | - 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
* Downgrade a number of FIXME asserts to ErrorUnsupported.Daniel Dunbar2008-08-291-1/+1
| | | | | | - Notably VLAs llvm-svn: 55544
* NeXT: Emit mostly-correct property type encoding.Daniel Dunbar2008-08-281-7/+15
| | | | | | - Added ASTContext::getObjCEncodingForPropertyDecl. llvm-svn: 55461
* NeXT: Refactor protocol method metadata emission.Daniel Dunbar2008-08-271-81/+91
| | | | | | Also, fix category protocol list metadata. llvm-svn: 55405
* NeXT: Emit correct properties for category.Daniel Dunbar2008-08-261-3/+16
| | | | | | | - Was emitting duplicates of class properties instead of the category properties. llvm-svn: 55395
* NeXT: Emit metadata for synthetsized properties.Daniel Dunbar2008-08-261-38/+82
| | | | | | Also, fix method lookup to not use LLVM module symbol table. llvm-svn: 55390
* Objective-C @synthesize support.Daniel Dunbar2008-08-261-3/+1
| | | | | | | | | | | - 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-20/+71
| | | | | | | - NeXT loads the super class at runtime; this required changing the runtime interface to pass more information down. llvm-svn: 55307
* NeXT: Emit symbols used to manage linking of Obj-C classes.Daniel Dunbar2008-08-251-1/+44
| | | | | | | | | | | - This ensures that references to undefined classes cause link errors. - NOTE: This relies on platform specific asm directives currently, this should be factored out. Also, don't emit a SYMBOLS metadata entry if there are no symbols. llvm-svn: 55302
* NeXT: Clean up constant CFString handling.Daniel Dunbar2008-08-231-72/+2
| | | | | | | | - Use CodeGenModule::GetAddrOfConstantCFString Some tweaks of CodeGenModule::GetAddrOfConstantCFString llvm-svn: 55243
* NeXT: Fix message sends which return structures.Daniel Dunbar2008-08-231-65/+101
| | | | | | - Simplify the sending code a bit. llvm-svn: 55232
* NeXT: Implement super message sends.Daniel Dunbar2008-08-231-6/+65
| | | | llvm-svn: 55225
* Trim CGObjCRuntime::GenerateMessageSend[Super]Daniel Dunbar2008-08-231-38/+39
| | | | | | | | | | | | | | | | | | - 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
* NeXT: Emit property metadata (classes, protocols, categories).Daniel Dunbar2008-08-231-36/+150
| | | | llvm-svn: 55209
* NeXT: Emit category metadata.Daniel Dunbar2008-08-221-30/+97
| | | | llvm-svn: 55197
* NeXT: Emit [meta]class protocol references.Daniel Dunbar2008-08-211-11/+18
| | | | | | | Updated ObjCProtocolDecl::protocol_iterator to match that of ObjCInterfaceDecl. llvm-svn: 55143
* Preliminary support for Obj-C classes in NeXT runtime.Daniel Dunbar2008-08-211-91/+612
| | | | | | | | - Functional for simple cases but there are some glaring omissions (protocols, properties, and other language extensions). - The code needs a fair bit of cleaning. llvm-svn: 55108
* Add NeXT runtime support for generating methods.Daniel Dunbar2008-08-161-6/+71
| | | | | | | | | | | | | 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-21/+23
| | | | | | | | | | | | | 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-60/+20
| | | | | | | | | - 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
* Implement Obj-C protocol metadata generation for NeXT.Daniel Dunbar2008-08-131-28/+420
| | | | | | - Near complete, only properties are missing. llvm-svn: 54715
* Change ObjCRuntime GenerateProtocol[Ref] methods to takeDaniel Dunbar2008-08-131-14/+4
| | | | | | | | | | | ObjCProtocolDecl directly. Implement CodeGen support for forward protocol decls (no-ops are so nice to implement). Also moved CGObjCRuntime.h out of CodeGenModule.h llvm-svn: 54709
* Emit OBJC_MODULE_INFO and OBJC_SYMBOLS metadataDaniel Dunbar2008-08-121-11/+125
| | | | | | - Matches llvm-gcc and seem to be expected by otool. llvm-svn: 54669
* Drop Sender from GenerateMessageSend*Daniel Dunbar2008-08-121-29/+15
| | | | | | | | | - Was unused and generated a unnecessary load of self Update NeXT runtime to get proper object & selector types from ASTContext. llvm-svn: 54667
* Add NeXT support for (simple) message sends.Daniel Dunbar2008-08-121-18/+108
| | | | llvm-svn: 54664
* Add ObjC constant string support for NeXT.Daniel Dunbar2008-08-121-13/+147
| | | | | | | | | | 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
* Add LangOptions::NeXTRuntime.Daniel Dunbar2008-08-111-0/+88
| | | | | | | | | - Wired to -fnext-runtime and -fgnu-runtime options. - Defaults to GNU, no autoselection for NeXT. Emit NeXT OBJC_IMAGE_INFO marker. llvm-svn: 54651
* More #include cleaningDaniel Dunbar2008-08-111-7/+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/+1
| | | | | | | | - Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and SourceLocation.h) - Move ASTContext constructor into implementation llvm-svn: 54627
* Add dummy Mac Objective-C runtime interface.Daniel Dunbar2008-08-111-0/+214
- Not currently accessible and completely non-functional. llvm-svn: 54624
OpenPOWER on IntegriCloud