summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC/encode-test-6.m
Commit message (Collapse)AuthorAgeFilesLines
* [ObjC] Fix encoding of ObjC pointer types that are pointers to typedefsAkira Hatanaka2019-05-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | clang was encoding pointers to typedefs as if they were pointers to structs because that is apparently what gcc is doing. For example: ``` @class Class1; typedef NSArray<Class1 *> MyArray; void foo1(void) { const char *s0 = @encode(MyArray *); // "^{NSArray=#}" const char *s1 = @encode(NSArray<Class1 *> *); // "@" } ``` This commit removes the code that was there to make clang compatible with gcc and make clang emit the correct encoding for ObjC pointers, which is "@". rdar://problem/50563529 Differential Revision: https://reviews.llvm.org/D61974 llvm-svn: 362034
* [opaque pointer types] Cleanup CGBuilder's Create*GEP.James Y Knight2019-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Some of these functions take some extraneous arguments, e.g. EltSize, Offset, which are computable from the Type and DataLayout. Add some asserts to ensure that the computed values are consistent with the passed-in values, in preparation for eliminating the extraneous arguments. This also asserts that the Type is an Array for the calls named "Array" and a Struct for the calls named "Struct". Then, correct a couple of errors: 1. Using CreateStructGEP on an array type. (this causes the majority of the test differences, as struct GEPs are created with i32 indices, while array GEPs are created with i64 indices) 2. Passing the wrong Offset to CreateStructGEP in TargetInfo.cpp on x86-64 NACL (which uses 32-bit pointers). Differential Revision: https://reviews.llvm.org/D57766 llvm-svn: 353529
* CodeGen: mark ObjC cstring literals as unnamed_addrSaleem Abdulrasool2016-09-181-4/+4
| | | | | | | | These are all emitted into a section with a cstring_literal attribute. The attribute permits the linker to coalesce the string contents. The address of the strings are not important. llvm-svn: 281855
* CodeGen: mark ObjC cstring literals as constantSaleem Abdulrasool2016-09-181-4/+4
| | | | | | | | These strings are constants, mark them as such. This doesn't matter too much in practice on MachO since the constants are placed into a special section and not referred to directly. llvm-svn: 281854
* Test case updates for explicit type parameter to the gep operatorDavid Blaikie2015-03-131-1/+1
| | | | llvm-svn: 232187
* Objective-C [IRGen]. Fixes a crash in IRGen involving use ofFariborz Jahanian2014-04-231-0/+11
| | | | | | | 'typeof' to extract type of an @encode expression used in an initializer. // rdar://16655340 llvm-svn: 207004
* Use private linkage for globals we already name with \01L and \01l.Rafael Espindola2014-02-271-4/+4
| | | | | | | | | | | | 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
* Objective-C: Produce gcc compatible encoding ofFariborz Jahanian2013-07-121-0/+18
| | | | | | | ivar type in meta-data while preventing recursive encoding in a corner case. // rdar://14408244 llvm-svn: 186169
* objective-C: Fixes a compiler crash when encodingFariborz Jahanian2013-02-151-0/+18
| | | | | | | an ivar of type pointer to a typedef'ed object. // rdar://13190095 llvm-svn: 175298
* objective-c IRGen: fixes a crash when method type is being mangledFariborz Jahanian2012-06-291-0/+19
when an argument type size is 0. // rdar://11777609, PR13229 llvm-svn: 159472
OpenPOWER on IntegriCloud