summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* 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
OpenPOWER on IntegriCloud