summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixes a problem in generation of meta-data forFariborz Jahanian2010-06-221-2/+10
| | | | | | | category implementation whereby property list was missing. NeXt ObjC runtime (radar 8093297). llvm-svn: 106550
* In fragile-abi (32bit mode abi) generate global symbolFariborz Jahanian2010-06-211-1/+11
| | | | | | | objc_category_name_xxx for each category implementation. (fixes PR7431) patch by Nico Weber. llvm-svn: 106492
* Fix an Obj-C++ miscompile when calling an Obj-C method that returns a C++ ↵Anders Carlsson2010-06-211-0/+5
| | | | | | reference. llvm-svn: 106477
* Objective-c++ IRGen. Support for @selector expression asFariborz Jahanian2010-06-171-9/+19
| | | | | | an lvalue. Fixes PR7390. llvm-svn: 106235
* Move CodeGenOptions.h *back* into Frontend. This should have been done when theChandler Carruth2010-06-151-1/+1
| | | | | | dependency edge was reversed such that CodeGen depends on Frontend. llvm-svn: 106065
* Patch adds support for copying of thoseFariborz Jahanian2010-06-151-14/+6
| | | | | | | | objective-c++ class objects which have GC'able objc object pointers and need to use ObjC's objc_memmove_collectable API (radar 8070772). llvm-svn: 106061
* zero-cost exception API for NeXt runtime.Fariborz Jahanian2010-05-281-2/+14
| | | | | | | | rethrow inside @catch block must use objc_exception_rethrow API. Fixes radar 8037512. Test will be added to LLVM test suite. llvm-svn: 104964
* Push a return-value slot throughout ObjC message-send codegen. Will beJohn McCall2010-05-221-8/+23
| | | | | | | critical for ObjC++ correctness; hard to test independently of various required Sema changes, though. llvm-svn: 104422
* Clean up some more uses of getAs<ObjCInterfaceType>() that Fariborz pointedJohn McCall2010-05-171-10/+10
| | | | | | out. The remaining ones are okay. llvm-svn: 103973
* Substantially alter the design of the Objective C type AST by introducingJohn McCall2010-05-151-1/+2
| | | | | | | | | | | | | | | | | | | | | ObjCObjectType, which is basically just a pair of one of {primitive-id, primitive-Class, user-defined @class} with a list of protocols. An ObjCObjectPointerType is therefore just a pointer which always points to one of these types (possibly sugared). ObjCInterfaceType is now just a kind of ObjCObjectType which happens to not carry any protocols. Alter a rather large number of use sites to use ObjCObjectType instead of ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather than hashing them in a FoldingSet. Remove some number of methods that are no longer used, at least after this patch. By simplifying ObjCObjectPointerType, we are now able to easily remove and apply pointers to Objective-C types, which is crucial for a certain kind of ObjC++ metaprogramming common in WebKit. llvm-svn: 103870
* Merged Elaborated and QualifiedName types.Abramo Bagnara2010-05-111-2/+2
| | | | llvm-svn: 103517
* IRgen/NeXT: Put the synthesized _objc_super, _message_ref_t decls in a valid ↵Daniel Dunbar2010-04-291-2/+4
| | | | | | DeclContext, to satisfy the invariants that should hold on a RecordDecl. llvm-svn: 102624
* IRGen for initialization/destruction ofFariborz Jahanian2010-04-281-0/+6
| | | | | | | ivar class objects (NeXt runtime). (radar 7900343). llvm-svn: 102533
* Changed signature of GenerateMessageSend() function to pass the ↵David Chisnall2010-04-281-4/+4
| | | | | | | | ObjCInterfaceDecl for class messages and removed the boolean IsClassMessage argument, which wasn't used anywhere. Emitted some metadata on message sends to allow a later pass to do some speculative inlining of class methods (GNU runtime). Speculative inlining of instance methods requires type feedback to be useful (work in progress), but for class methods it works quite nicely. llvm-svn: 102514
* Make the static type of the exception variable in an Objective-CDouglas Gregor2010-04-261-4/+4
| | | | | | | @catch a VarDecl. The dynamic type is still a ParmVarDecl, but that will change soon. No effective functionality change. llvm-svn: 102341
* IRgen/NeXT: Fix several alignment issues with Objective-C metadata symbols:Daniel Dunbar2010-04-251-14/+15
| | | | | | | | | - Fix some places that had the alignment hard coded. - Use ABI type alignment, not preferred type alignment -- neither of this is exactly right, as we really want the C type alignment as required by the runtime, but the ABI alignment is a more correct choice. This should be equivalent for x86_64, but fixes the alignment for ARM. llvm-svn: 102314
* IRgen/NeXT: Reuse EmitImageInfo for both fragile and non-fragile ABI. This ↵Daniel Dunbar2010-04-251-32/+9
| | | | | | fixes Clang to correctly emit the "CorrectedSynthesize" bit when using the non-fragile ABI. llvm-svn: 102312
* NeXT: Clean up dispatch method policy selection.Daniel Dunbar2010-04-241-5/+12
| | | | | | | | | | - Replace -cc1 level -fobjc-legacy-dispatch with -fobjc-dispatch-method={legacy,non-legacy,mixed}. - Lift "mixed" vs "non-mixed" policy choice up to driver level, instead of being buried in CGObjCMac.cpp. - No intended functionality change. llvm-svn: 102255
* Improve the AST representation of Objective-C @try/@catch/@finallyDouglas Gregor2010-04-231-38/+39
| | | | | | | | | | statements. Instead of the @try having a single @catch, where all of the @catch's were chained (using an O(n^2) algorithm nonetheless), @try just holds an array of its @catch blocks. The resulting AST is slightly more compact (not important) and better represents the actual language semantics (good). llvm-svn: 102221
* NeXT/EH: When generating the rethrow code for a finally block, make sure toDaniel Dunbar2010-04-231-2/+12
| | | | | | | chain outwards when inside a nested exception scope. - A real test for this is going into LLVM test-suite. llvm-svn: 102204
* NeXT/EH: Tidy up EH code a bit, don't emit the catch block EH handler if it ↵Daniel Dunbar2010-04-231-27/+32
| | | | | | is unreachable. llvm-svn: 102203
* Support for -fno-constant-cfstrings option - wip.Fariborz Jahanian2010-04-221-1/+12
| | | | llvm-svn: 102112
* Check for darwin befoer cheking for version.Fariborz Jahanian2010-04-191-1/+2
| | | | | | (related to radar 7866951). llvm-svn: 101799
* Force clang to produce legacy api for messagingFariborz Jahanian2010-04-191-1/+4
| | | | | | | in for pre-snowleoprd (NeXt runtime). Fixes radar 7866951 llvm-svn: 101791
* fix integrated assembler with i386 objc code.Chris Lattner2010-04-171-4/+4
| | | | llvm-svn: 101660
* Add raw_ostream operators to NamedDecl for convenience. Switch over all ↵Benjamin Kramer2010-04-171-1/+1
| | | | | | | | users of getNameAsString on a stream. The next step is to print the name directly into the stream, avoiding a temporary std::string copy. llvm-svn: 101632
* IRgen: Change CGBitFieldInfo to take the AccessInfo as constructor ↵Daniel Dunbar2010-04-151-5/+5
| | | | | | | | arguments, it is now an immutable object. Also, add some checking of various invariants that should hold on the CGBitFieldInfo access. llvm-svn: 101345
* IRgen: Eliminate now unused fields from CGBitFieldInfo.Daniel Dunbar2010-04-151-3/+2
| | | | llvm-svn: 101344
* IRgen/NeXT: Simplify to use AST record layout for getting offsets instead of theDaniel Dunbar2010-04-141-13/+4
| | | | | | IRgen record layout, which this code doesn't need to depend on. llvm-svn: 101257
* IRgen: Enhance CGBitFieldInfo with enough information to fully describe the ↵Daniel Dunbar2010-04-131-0/+11
| | | | | | | | | | "policy" with which a bit-field should be accessed. - For now, these policies are computed to match the current IRgen strategy, although the new information isn't being used yet (except in -fdump-record-layouts). - Design comments appreciated. llvm-svn: 101178
* Add some API code for future work.Fariborz Jahanian2010-04-121-0/+28
| | | | llvm-svn: 101052
* IRgen: Move the bit-field access type into CGBitFieldInfo, and change ↵Daniel Dunbar2010-04-081-2/+2
| | | | | | bit-field LValues to just store the base address of object containing the bit-field. llvm-svn: 100745
* IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo.Daniel Dunbar2010-04-061-3/+3
| | | | llvm-svn: 100513
* IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo.Daniel Dunbar2010-04-051-2/+11
| | | | | | | | | - Unfortunately, this requires some horrible code in CGObjCMac which always allocats a CGBitFieldInfo because we don't currently build a proper layout for Objective-C classes. It needs to be cleaned up, but I don't want the bit-field cleanups to be blocked on that. llvm-svn: 100474
* IRgen: Lift BitFieldInfo to CGBitFieldInfo at namespace level.Daniel Dunbar2010-04-051-1/+1
| | | | llvm-svn: 100433
* Add a FIXME and reduce nesting.Daniel Dunbar2010-04-051-18/+16
| | | | llvm-svn: 100432
* IRgen/NeXT: Remove my refactoring-enabling asserts, and add a FIXME.Daniel Dunbar2010-04-021-12/+3
| | | | llvm-svn: 100237
* IRgen/Obj-C: Eliminate FindIvarInterface, now that ivar's are in the right ↵Daniel Dunbar2010-04-021-43/+25
| | | | | | | | DeclContexts (-2 FIXMEs). We still have an annoying linear scan + hidden dependency on how Obj-C layout is done. - This is also an algorithmic improvement in IRgen for Obj-C, although it probably doesn't matter in practice. llvm-svn: 100228
* CG/NeXT: Assert some invariants on an ivar's containing decl context that I ↵Daniel Dunbar2010-04-021-0/+13
| | | | | | am about to refactor based on, following some testing. llvm-svn: 100188
* IRGen: Move the auxiliary data structures tracking AST -> LLVM mappings out ↵Daniel Dunbar2010-03-311-2/+5
| | | | | | | | of CodeGenTypes, to per-record CGRecordLayout structures. - I did a cursory check that this was perf neutral, FWIW. llvm-svn: 99978
* the big refactoring bits of PR3782.Rafael Espindola2010-03-301-6/+10
| | | | | | | | This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. llvm-svn: 99920
* Use the power of types to track down another canonicalization bug inJohn McCall2010-02-261-11/+10
| | | | | | the ABI-computation interface. Fixes <rdar://problem/7691046>. llvm-svn: 97197
* Patch removes IVars list from ObjCInterfaceDecl andFariborz Jahanian2010-02-191-1/+1
| | | | | | instead relies on their DeclContext for iteration, etc. llvm-svn: 96638
* Eliminate a bunch of unnecessary ASTContexts from members functions ofDouglas Gregor2010-02-111-2/+2
| | | | | | Decl subclasses. No functionality change. llvm-svn: 95841
* Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixesDaniel Dunbar2010-02-101-1/+2
| | | | | | | calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling, for Darwin ARM. llvm-svn: 95787
* Standardize the parsing of function type attributes in a way thatJohn McCall2010-02-051-6/+12
| | | | | | | | | | | | follows (as conservatively as possible) gcc's current behavior: attributes written on return types that don't apply there are applied to the function instead, etc. Only parse CC attributes as type attributes, not as decl attributes; don't accepet noreturn as a decl attribute on ValueDecls, either (it still needs to apply to other decls, like blocks). Consistently consume CC/noreturn information throughout codegen; enforce this by removing their default values in CodeGenTypes::getFunctionInfo(). llvm-svn: 95436
* Revert "Numerous changes to selector handling:", this breaks a whole bunch ofDaniel Dunbar2010-02-031-8/+0
| | | | | | working code, for no apparent reason. llvm-svn: 95244
* Numerous changes to selector handling:David Chisnall2010-02-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | - Don't use GlobalAliases with non-0 GEPs (GNU runtime) - this was unsupported and LLVM will be generating errors if you do it soon. This also simplifies the code generated by the GNU runtime a bit. - Make GetSelector() return a constant (GNU runtime), not a load of a store of a constant. - Recognise @selector() expressions as valid static initialisers (as GCC does). - Add methods to GCObjCRuntime to emit selectors as constants (needed for using @selector() expressions as constants. These need implementing for the Mac runtimes - I couldn't figure out how to do this, they seem to require a load. - Store an ObjCMethodDecl in an ObjCSelectorExpr so that we can get at the type information for the selector. This is needed for generating typed selectors from @selector() expressions (as GCC does). Ideally, this information should be stored in the Selector, but that would be an invasive change. We should eventually add checks for common uses of @selector() expressions. Possibly adding an attribute that can be applied to method args providing the types of a selector so, for example, you'd do something like this: - (id)performSelector: __attribute__((selector_types(id, SEL, id)))(SEL) withObject: (id)object; Then, any @selector() expressions passed to the method will be check to ensure that it conforms to this signature. We do this at run time on the GNU runtime already, but it would be nice to do it at compile time on all runtimes. - Made @selector() expressions emit type info if available and the runtime supports it. Someone more familiar with the Mac runtime needs to implement the GetConstantSelector() function in CGObjCMac. This currently just assert()s. llvm-svn: 95189
* NeXT: Add support for -fobjc-legacy-dispatch.Daniel Dunbar2010-02-011-0/+4
| | | | llvm-svn: 95005
* Created __builtin___NSStringMakeConstantString() builtin, which generates ↵David Chisnall2010-01-231-3/+3
| | | | | | constant Objective-C strings. llvm-svn: 94274
OpenPOWER on IntegriCloud