Commit Graph

4 Commits

Author SHA1 Message Date
Saleem Abdulrasool 3f307518f8 CodeGen: mark ObjC cstring literals as unnamed_addr
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
2016-09-18 16:12:14 +00:00
Saleem Abdulrasool 0c54dc862e CodeGen: mark ObjC cstring literals as constant
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
2016-09-18 16:12:04 +00:00
Douglas Gregor 9dd25b7696 Objective-C properties: merge attributes when redeclaring 'readonly' as 'readwrite' in an extension.
r251874 stopped back-patching the AST when an Objective-C 'readonly'
property is redeclared in a class extension as 'readwrite'. However,
it did not properly handle merging of Objective-C property attributes
(e.g., getter name, ownership, atomicity) to the redeclaration,
leading to bad metadata. Merge (and check!) those property attributes
so we get the right metadata and reasonable ASTs. Fixes
rdar://problem/23823989.

llvm-svn: 255309
2015-12-10 23:02:09 +00:00
Nico Weber 08c9333df2 Fix Objective-C metadata for properties from class extensions after r251874
After, properties from class extensions no longer show up in
ObjCInterfaceDecl::properties().  Make ObjCCommonMac::EmitPropertyList()
explicitly look for properties in class extensions before looking at
direct properties.

Also add a test that passes both with clang before r251874 and after this
patch (but fails with r251874 and without this patch).

llvm-svn: 254622
2015-12-03 17:44:51 +00:00