summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Allow protocols to be just declared.Rafael Espindola2014-09-121-3/+3
| | | | llvm-svn: 217704
* Objective-C IRGen. Fixes an assertion crash caused by inconsistentFariborz Jahanian2014-08-281-2/+1
| | | | | | | | linkage related to generation of OBJC_SELECTOR_REFERENCES symbol needed in generation of call to 'super' in a class method. // rdar://18150301 llvm-svn: 216676
* Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or ↵Craig Topper2014-08-271-3/+2
| | | | | | just letting them be implicitly created. llvm-svn: 216528
* AArch64: update Clang for merged arm64/aarch64 triples.Tim Northover2014-07-231-2/+1
| | | | | | | | | | | | | | The main subtlety here is that the Darwin tools still need to be given "-arch arm64" rather than "-arch aarch64". Fortunately this already goes via a custom function to handle weird edge-cases in other architectures, and it tested. I removed a few arm64_be tests because that really isn't an interesting thing to worry about. No-one using big-endian is also referring to the target as arm64 (at least as far as toolchains go). Mostly they date from when arm64 was a separate target and we *did* need a parallel name simply to test it at all. Now aarch64_be is sufficient. llvm-svn: 213744
* Objective-C. Introducing __attribute__((objc_runtime_name("runtimename"))Fariborz Jahanian2014-07-161-112/+144
| | | | | | | | | to be applied to class or protocols. This will direct IRGen for Objective-C metadata to use the new name in various places where class and protocol names are needed. rdar:// 17631257 llvm-svn: 213167
* Objective-C IRGen. Fixes an inconsistant linkage ofFariborz Jahanian2014-07-151-7/+4
| | | | | | | ObC's metaclass metadata with its class metadata which results in an assert. rdar://17633301 llvm-svn: 213076
* Don't assume StringRef.data() is null-terminatedBen Langmuir2014-07-111-1/+1
| | | | llvm-svn: 212790
* Objective-C IRGen. Patch to generate a weak symbol reference whenFariborz Jahanian2014-06-101-4/+7
| | | | | | | | 'super' dispatches a class method in category for OBJC_METACLASS. This is when class is a weak_import class. // rdar://16529125 llvm-svn: 210547
* Avoid dubious IdentifierInfo::getNameStart() usesAlp Toker2014-06-071-32/+24
| | | | | | | | These cases in particular were incurring an extra strlen() when we already knew the length. They appear to be leftovers from when the interfaces worked with C strings that have continued to compile due to the implicit StringRef ctor. llvm-svn: 210403
* AArch64/ARM64: rename ARM64 components to AArch64Tim Northover2014-05-241-1/+2
| | | | | | This keeps Clang consistent with backend naming conventions. llvm-svn: 209579
* [C++11] Use 'nullptr'. CodeGen edition.Craig Topper2014-05-211-70/+76
| | | | llvm-svn: 209272
* Simplify the code a bit by using linkage predicates.Rafael Espindola2014-05-091-4/+4
| | | | llvm-svn: 208382
* ARM64: parametrise IVar offset type (long on ARM64, int elsewhere).Tim Northover2014-03-291-22/+33
| | | | | | | This is part of the ARM64 patch, but can only be tested properly when the full codegen gets committed. llvm-svn: 205098
* ObjC: allow targets to decide when to use stret for blocks.Tim Northover2014-03-291-2/+6
| | | | | | | This was originally part of the ARM64 patch, but seems semantically separate. llvm-svn: 205097
* Don't produce a L symbol in __DATA,__data.Rafael Espindola2014-03-271-1/+1
| | | | | | The section __DATA,__data is atomized by the linker and cannot have L symbols. llvm-svn: 204879
* [C++11] Replacing BlockDecl iterators capture_begin() and capture_end() with ↵Aaron Ballman2014-03-141-10/+8
| | | | | | iterator_range captures(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203958
* [C++11] Replacing ObjCCategoryDecl iterators propimpl_begin() and ↵Aaron Ballman2014-03-141-8/+2
| | | | | | propimpl_end() with iterator_range property_impls(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203930
* [C++11] Replacing ObjCCategoryDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-141-4/+2
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203922
* [C++11] Replacing ObjCProtocolDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-131-3/+2
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203863
* [C++11] Replacing ObjCInterfaceDecl iterators ↵Aaron Ballman2014-03-131-5/+2
| | | | | | all_referenced_protocol_begin() and all_referenced_protocol_end() with iterator_range all_referenced_protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203848
* [C++11] Replacing ObjCContainerDecl iterators classmeth_begin() and ↵Aaron Ballman2014-03-131-22/+10
| | | | | | classmeth_end() with iterator_range class_methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203840
* [C++11] Replacing ObjCContainerDecl iterators instmeth_begin() and ↵Aaron Ballman2014-03-131-22/+13
| | | | | | instmeth_end() with iterator_range instance_methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203839
* Renaming the recently-created (r203830) props() range API to properties() ↵Aaron Ballman2014-03-131-2/+2
| | | | | | for clarity. llvm-svn: 203835
* [C++11] Replacing ObjCContainerDecl iterators prop_begin() and prop_end() ↵Aaron Ballman2014-03-131-10/+6
| | | | | | with iterator_range props(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203830
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-121-171/+155
| | | | | | class. llvm-svn: 203643
* Objective-C IRGen. Fixes several regressions caused by changes madeFariborz Jahanian2014-03-111-5/+31
| | | | | | to setting of ObjC linkages. //rdar://16206443 llvm-svn: 203521
* Reverting llvm::distance changes to use std::distance with iterators ↵Aaron Ballman2014-03-101-4/+2
| | | | | | | | instead, per post-commit review feedback. Replacing llvm::copy changes with SmallVector range-based construction which is a considerably cleaner approach. llvm-svn: 203461
* [C++11] Replacing RecordDecl iterators field_begin() and field_end() with ↵Aaron Ballman2014-03-081-6/+2
| | | | | | iterator_range fields(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203355
* [C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() ↵Aaron Ballman2014-03-071-6/+2
| | | | | | with iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203255
* Use llvm.compiler.used instead of llvm.used for objc symbols.Rafael Espindola2014-03-061-17/+17
| | | | | | | | | | | | | LLVM currently has a hack (shouldEmitUsedDirectiveFor) that causes it to not print no_dead_strip for symbols starting with 'l' or 'L'. These are exactly the ones that the clang's objc codegen is producing. The net result, is that it is equivalent to llvm.compiler.used. The need for putting the private symbol in llvm.compiler.used should be clear (the objc runtime uses them). The reason for also putting the weak symbols in it is for LTO: ld64 will not ask us to preserve the it. llvm-svn: 203172
* Revert "Use private linkage for remaining GlobalVariables with private names."Rafael Espindola2014-03-061-11/+11
| | | | | | | | This reverts commit r203059. Revert while we discuss what does it mean to be private and weak. llvm-svn: 203141
* Use private linkage for remaining GlobalVariables with private names.Rafael Espindola2014-03-061-11/+11
| | | | | | | | | | | | | | | | | | | | | | This patch changes the remaining GlobalVariables using "\01L" and "\01l" prefixes to use private linkage. What is strange about them is that they currently use WeakAnyLinkage. There is no comment stating why and that is really odd since the symbols are completely hidden, so it doesn't make sense for them to be weak. Clang revisions like r63329, r63408, r63770, r65761 set the linkage to weak, but don't say why. I suspect they were just copying llvm-gcc. In llvm-gcc I found r58599 and r56322 that set DECL_WEAK, but they were just syncing from the apple gcc. I am not exactly sure what that means, since the last commit to svn://gcc.gnu.org/svn/gcc/branches/apple was in 2006, 2 years earlier. In summary, I have no idea why weak linkage was being used :-( To quote John McCall, "Let’s try without it and see" :-) llvm-svn: 203059
* Construct GlobalValues with the correct linkage instead of using setLinkage.Rafael Espindola2014-03-061-8/+7
| | | | llvm-svn: 203052
* Objective-C. Return 0 as class of methods in protocols.Fariborz Jahanian2014-03-041-2/+1
| | | | | | | This simplifies my last patch a bit. No change in functionality. llvm-svn: 202906
* Objective-C IRGen. Fix up the hueristics for determiningFariborz Jahanian2014-03-041-8/+10
| | | | | | | | if an ivar offset load is invariant iff inside an instance method and ivar belongs to instance method's class and one of its super class. // rdar://16095748 llvm-svn: 202872
* [Modules] Update to reflect the move of CallSite into the IR library inChandler Carruth2014-03-041-1/+1
| | | | | | LLVM r202816. llvm-svn: 202817
* Objective-C. Fixes a regression when figuring out linkageFariborz Jahanian2014-03-031-1/+2
| | | | | | | for metadata symbols for forward referenced protocols which are never defined. // rdar://16203115 llvm-svn: 202761
* Switch all uses of LLVM_OVERRIDE to just use 'override' directly.Craig Topper2014-03-021-2/+2
| | | | llvm-svn: 202625
* Fix -Wunused-function in Release build.Rui Ueyama2014-02-271-0/+1
| | | | llvm-svn: 202429
* Use private linkage for globals we already name with \01L and \01l.Rafael Espindola2014-02-271-17/+18
| | | | | | | | | | | | In llvm the only semantic difference between internal and private is that llvm tries to hide private globals my mangling them with a private prefix. Since the globals changed by this patch already had the magic don't mangle marker, there should be no change in the generated assembly. A followup patch should then be able to drop the \01L and \01l prefixes and let llvm mangle as appropriate. llvm-svn: 202419
* Assert that the name of some internal variables start with \01L or \01l.Rafael Espindola2014-02-271-47/+55
| | | | | | | No functionality change. This is just an intermediate patch for changing those global variables to use private linkage. llvm-svn: 202409
* Fix -Wunused-variable in non-assert builds. No functionality change.Nick Lewycky2014-02-271-0/+1
| | | | llvm-svn: 202330
* Refactor linkage computation in CGObjCMac.cpp.Rafael Espindola2014-02-261-70/+66
| | | | | | | | | | | | | | Before this patch the globals were created with the wrong linkage and patched afterwards. From the comments it looks like something would complain about having an internal GV with no initializer. At least in clang the verifier will only run way after we set the initializer, so that is not a problem. This patch should be a nop. It just figures out the linkage earlier and converts the old calls to setLinkage to asserts. The only case where that is not possible is when we first see a weak import that is then implemented. In that case we have to change the linkage, but that is the only setLinkage left. llvm-svn: 202305
* Objective-C. Remove an assertion which assertsFariborz Jahanian2014-02-241-6/+0
| | | | | | | on correctly handled block layout IRGen. // rdar://16111839 llvm-svn: 202063
* Remove really old "APPLE LOCAL" markers.Rafael Espindola2014-02-201-1/+1
| | | | llvm-svn: 201791
* [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
OpenPOWER on IntegriCloud