summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Remove some dead variables clang-analyzer found.Benjamin Kramer2009-12-251-5/+1
| | | | llvm-svn: 92162
* Pass ReturnValueSlot to EmitCall. No functionality change yet.Anders Carlsson2009-12-241-2/+2
| | | | llvm-svn: 92138
* Patch to fix 32-bit @try failure with internal assertion when compiling Fariborz Jahanian2009-12-141-2/+5
| | | | | | an Objective-C rethrow nested inside another try/catch block. (fixes radar 7466728). llvm-svn: 91335
* patch to add a property from a protocol to a class that adopts the protocol.Fariborz Jahanian2009-12-121-0/+34
| | | | | | (fixes radar 7466494). llvm-svn: 91227
* (objc2 nonfragile-abi specific). If the translation unit includes an ↵Fariborz Jahanian2009-12-011-11/+10
| | | | | | | | | implementation of a subclass (direct or indirect) of a weak_import root class, emit a weak reference for the root class's metaclass (should complete radar 6815425). llvm-svn: 90249
* Don't pass false (default) for isVolatile parameter to CreateLoad.Daniel Dunbar2009-11-291-11/+10
| | | | llvm-svn: 90098
* This patch finalizes implementatin of weak_importFariborz Jahanian2009-11-171-0/+6
| | | | | | objective-c2 classes (radar 6815425). llvm-svn: 89157
* More cases for weak_import objective-c2 classes.Fariborz Jahanian2009-11-171-0/+3
| | | | | | (still radar 6815425). llvm-svn: 89152
* More support for weak_import objective-c2 class.Fariborz Jahanian2009-11-171-0/+27
| | | | | | (radar 6815425). llvm-svn: 89146
* Generate the old API when sending message to superFariborz Jahanian2009-11-141-1/+4
| | | | | | in a category implementation (objc 32bit api related). llvm-svn: 88741
* Fix a code gen bug in i386-apple-darwin (objc fragile abi), sendingFariborz Jahanian2009-11-121-6/+38
| | | | | | message to 'super'. Fixes radar 7205866. llvm-svn: 87017
* Avoid std::string concatenation.Daniel Dunbar2009-10-191-16/+10
| | | | llvm-svn: 84458
* PR5218: Replace IdentifierInfo::getName with StringRef version, now that clientsDaniel Dunbar2009-10-181-5/+5
| | | | | | are updated. llvm-svn: 84447
OpenPOWER on IntegriCloud