summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [ms-cxxabi] Use x86_cdeclmethodcc for __cdecl methods on win32Reid Kleckner2014-01-311-11/+16
| | | | | | | | | | | | | | | | | | | This fixes PR15768, where the sret parameter and the 'this' parameter are in the wrong order. Instance methods compiled by MSVC never return records in registers, they always return indirectly through an sret pointer. That sret pointer always comes after the 'this' parameter, for both __cdecl and __thiscall methods. Unfortunately, the same is true for other calling conventions, so we'll have to change the overall approach here relatively soon. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2664 llvm-svn: 200587
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-251-2/+2
| | | | | | | | | | | | | | | A return type is the declared or deduced part of the function type specified in the declaration. A result type is the (potentially adjusted) type of the value of an expression that calls the function. Rule of thumb: * Declarations have return types and parameters. * Expressions have result types and arguments. llvm-svn: 200082
* Improve comment.Fariborz Jahanian2014-01-141-3/+3
| | | | llvm-svn: 199258
* ObjectiveC. add comment.Fariborz Jahanian2014-01-141-3/+3
| | | | llvm-svn: 199257
* Add CodeGenABITypes.h for use in LLDB.Mark Lacey2013-10-301-0/+1
| | | | | | | | | | | | | | | | | | CodeGenABITypes is a wrapper built on top of CodeGenModule that exposes some of the functionality of CodeGenTypes (held by CodeGenModule), specifically methods that determine the LLVM types appropriate for function argument and return values. I addition to CodeGenABITypes.h, CGFunctionInfo.h is introduced, and the definitions of ABIArgInfo, RequiredArgs, and CGFunctionInfo are moved into this new header from the private headers ABIInfo.h and CGCall.h. Exposing this functionality is one part of making it possible for LLDB to determine the actual ABI locations of function arguments and return values, making it possible for it to determine this for any supported target without hard-coding ABI knowledge in the LLDB code. llvm-svn: 193717
* ObjectiveC IRGen. Replace _objc_empty_vtable pointer in Objective-C Fariborz Jahanian2013-10-241-8/+18
| | | | | | class metadata for certain deployment targets. // rdar://14802916 llvm-svn: 193359
* Clean up some Triple usage in clang.Cameron Esfahani2013-09-141-1/+1
| | | | llvm-svn: 190737
* Use the ugly PRIx64 macro to make format string portable.Benjamin Kramer2013-04-221-1/+1
| | | | | | | This is debugging code so functionality isn't a concern, but mingw32 warns because it doesn't understand the %llx format specifier. llvm-svn: 180024
* Standardize accesses to the TargetInfo in IR-gen.John McCall2013-04-161-9/+9
| | | | | | Patch by Stephen Lin! llvm-svn: 179638
* In ObjC++ on legacy runtimes, push an EH cleanup as well asJohn McCall2013-04-031-1/+4
| | | | | | | | | | | | a normal cleanup when entering a @try or @synchronized to ensure that we clean that up if an exception is triggered. Apparently GCC did this, so it's hard to argue that we shouldn't do at least as much. rdar://12364847 llvm-svn: 178599
* Tighten up the rules for precise lifetime and documentJohn McCall2013-03-131-1/+1
| | | | | | | | the requirements on the ARC optimizer. rdar://13407451 llvm-svn: 176924
* Use the actual ABI-determined C calling convention for runtimeJohn McCall2013-02-281-131/+127
| | | | | | | | | | | | | | | | | | | | | | calls and declarations. LLVM has a default CC determined by the target triple. This is not always the actual default CC for the ABI we've been asked to target, and so we sometimes find ourselves annotating all user functions with an explicit calling convention. Since these calling conventions usually agree for the simple set of argument types passed to most runtime functions, using the LLVM-default CC in principle has no effect. However, the LLVM optimizer goes into histrionics if it sees this kind of formal CC mismatch, since it has no concept of CC compatibility. Therefore, if this module happens to define the "runtime" function, or got LTO'ed with such a definition, we can miscompile; so it's quite important to get this right. Defining runtime functions locally is quite common in embedded applications. llvm-svn: 176286
* Use the actual class visibility for the ObjC EHTYPE global,John McCall2013-02-191-1/+1
| | | | | | | | not the global visibility mode. Noticed by inspection. llvm-svn: 175479
* CodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.Douglas Gregor2013-02-181-3/+3
| | | | llvm-svn: 175448
* [CodeGen] tighten objc ivar invariant.load attributionSaleem Abdulrasool2013-02-171-4/+25
| | | | | | | | | | | | | | | | | An ivar ofset cannot be marked as invariant load in all cases. The ivar offset is a lazily initialised constant, which is dependent on an objc_msgSend invocation to perform a fixup of the offset. If the load is being performed on a method implemented by the class then this load can safely be marked as an inviarant because a message must have been passed to the class at some point, forcing the ivar offset to be resolved. An additional heuristic that can be used to identify an invariant load would be if the ivar offset base is a parameter to an objc method. However, without the parameters available at hand, this is currently not possible. Reviewed-by: John McCall <rjmccall@apple.com> Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> llvm-svn: 175386
* Properly assemble PHIs after a null-checked invoke of objc_msgSend.John McCall2013-02-121-40/+67
| | | | | | rdar://12046763 llvm-svn: 174946
* Changed CGObjCMac.cpp to add the marker externally_initialized to ↵Michael Gottesman2013-02-051-0/+2
| | | | | | | | | | | | | SELECTOR_REFERENCES in both the fragile and non-fragile API. This is to ensure that GlobalOpt in LLVM does not attempt to look through a selector reference to a method var name at compile time. I also added a test/updated old tests that need to recognize the new keyword. rdar://12580965. llvm-svn: 174461
* Make sure that the Attribute object represents one attribute only.Bill Wendling2013-01-311-10/+14
| | | | | | | | Several places were still treating the Attribute object as respresenting multiple attributes. Those places now use the AttributeSet to represent multiple attributes. llvm-svn: 174004
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-11/+11
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* objectiveC++: When throwing c++ exception of Fariborz Jahanian2013-01-101-6/+12
| | | | | | | an objectiveC object, use objc_exception_throw to raise the exception. // rdar://12605907 llvm-svn: 172091
* Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate toChandler Carruth2013-01-021-5/+5
| | | | | | | | reflect the migration in r171366. Re-sort the #include lines to reflect the new paths. llvm-svn: 171369
* Rename llvm::Attributes to llvm::Attribute.Bill Wendling2012-12-201-4/+4
| | | | llvm-svn: 170722
* Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling2012-12-201-4/+4
| | | | | | which is wrong here. llvm-svn: 170721
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-4/+4
| | | | | | single attribute in the future. llvm-svn: 170500
* Reapply r170344, this time without forgetting to commit the header changes.David Chisnall2012-12-171-3/+10
| | | | llvm-svn: 170354
* Revert "Added support for new property helpers (GNUstep runtime)."Benjamin Kramer2012-12-171-10/+3
| | | | | | This reverts commit r170344. Doesn't even compile. llvm-svn: 170351
* Added support for new property helpers (GNUstep runtime).David Chisnall2012-12-171-3/+10
| | | | llvm-svn: 170344
* objective-c blocks: Consider padding due to alignmentFariborz Jahanian2012-12-041-1/+4
| | | | | | | after the fixed size block header when generating captured block variable info. // rdar://12773256 llvm-svn: 169285
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-10/+8
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* objective-C blocks: Provide layout map for byrefFariborz Jahanian2012-11-141-71/+111
| | | | | | variables captured in a block. // rdar://12184410 llvm-svn: 167931
* objective-C blocks: bring back the CharUnit patch forFariborz Jahanian2012-11-071-45/+46
| | | | | | | captured block variable layout meta-data. No intended change in functionality. llvm-svn: 167549
* Back out 167431+167437+167487; I didn't realize how incomplete our testEli Friedman2012-11-061-114/+121
| | | | | | coverage of this code is. llvm-svn: 167495
* Fix a silly mistake in r167437.Eli Friedman2012-11-061-2/+2
| | | | llvm-svn: 167487
* Propagate CharUnits through CGObjCMac.cpp.Eli Friedman2012-11-061-84/+78
| | | | llvm-svn: 167437
* Minor fix to ObjC layout bitmap metadata. Found while I was trying toEli Friedman2012-11-061-1/+1
| | | | | | refactor the code. llvm-svn: 167436
* Propagate CharUnits into ObjC CodeGen. No intended functional change.Eli Friedman2012-11-061-46/+45
| | | | llvm-svn: 167431
* Fixes liftime of captured block variables in mrr mode, per John's feedback, asFariborz Jahanian2012-11-041-17/+12
| | | | | | well as couple of tests which were not being excercised because of TYPOs. llvm-svn: 167374
* objective-C mrr block. Block variable layout metadata inFariborz Jahanian2012-11-021-5/+26
| | | | | | mrr mode. llvm-svn: 167331
* Silence -Wformat on platforms where uint64_t is unsigned long.Matt Beaumont-Gay2012-11-011-1/+1
| | | | llvm-svn: 167249
* objective-C block meta-data. This patch completes meta-dataFariborz Jahanian2012-11-011-16/+162
| | | | | | | | generation for captured block variables in arc mode. This includes inlined version of the meta-data when it can be done. It also includes severat tests. This is wip. // rdar://12184410. llvm-svn: 167241
* objective-C arc/mrr: Another patch for the new captured block variable Fariborz Jahanian2012-10-301-23/+191
| | | | | | layout meta-data. It is currently off (so no tests). This is wip. llvm-svn: 167047
* objective-C arc/mrr: Patch for the new block variable layout meta-data.Fariborz Jahanian2012-10-271-3/+164
| | | | | | It is currently off (so no tests). This is wip. llvm-svn: 166892
* Add some new types in preparation of encoding of captured block variableFariborz Jahanian2012-10-251-0/+69
| | | | | | layout meta-data work. wip. llvm-svn: 166717
* Set a special flag in class metadata when an Objective-C classJohn McCall2012-10-171-4/+26
| | | | | | | | | has ivars that require destruction, but none that require anything except zero-initialization. This is common in ARC and (when true throughout a class hierarchy) permits the elimination of an unnecessary message-send during allocation. llvm-svn: 166088
* Organize and rename the magic constants for class flags.John McCall2012-10-171-48/+54
| | | | | | No functionality change. llvm-svn: 166087
* Use the Attributes::get method which takes an AttrVal value directly to ↵Bill Wendling2012-10-161-6/+2
| | | | | | simplify the code a bit. No functionality change. llvm-svn: 166010
* Move the Attributes::Builder outside of the Attributes class and into its ↵Bill Wendling2012-10-151-2/+2
| | | | | | own class named AttrBuilder. No functionality change. llvm-svn: 165961
* Attributes RewriteBill Wendling2012-10-151-2/+4
| | | | | | | | Convert the uses of the Attributes class over to the new format. The Attributes::get method call now takes an LLVM context so that the attributes object can be uniquified and stored. llvm-svn: 165918
* objective-C IRgen: When sending a method to 'super'Fariborz Jahanian2012-10-101-9/+2
| | | | | | | | | in a category class method, don't read 'isa' pointer. Instead, save the desired OBJC_METACLASS_$_ClassName in __DATA,__objc_superrefs and read that without reading any isa pointers. // rdar://12459358 llvm-svn: 165674
* Remove the final bits of Attributes being declared in the AttributeBill Wendling2012-10-101-2/+6
| | | | | | | namespace. Use the attribute's enum value instead. No functionality change intended. llvm-svn: 165611
OpenPOWER on IntegriCloud