Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix autoupgrade logic for Objective-C class properties module flag
Previous we were issuing an error when linking a module containing the new Objective-C metadata structure for class properties with an "old" one. Now instead we downgrade the module flag so that the Objective-C runtime does not expect the new metadata structure. This is consistent with what ld64 is doing on binary files. Differential Revision: https://reviews.llvm.org/D24620 llvm-svn: 281685
- Loading branch information
Showing
4 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
llvm/test/Linker/Inputs/objectivec-class-property-flag-mismatch.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
!llvm.module.flags = !{!0, !1} | ||
|
||
!0 = !{i32 1, !"Objective-C Image Info Version", i32 0} | ||
!1 = !{i32 1, !"Objective-C Class Properties", i32 64} |
16 changes: 16 additions & 0 deletions
16
llvm/test/Linker/objectivec-class-property-flag-mismatch.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
; RUN: llvm-as < %s -o %t1.bc | ||
; RUN: llvm-as < %p/Inputs/objectivec-class-property-flag-mismatch.ll -o %t2.bc | ||
|
||
|
||
; RUN: llvm-link %t1.bc %t2.bc -S | FileCheck %s | ||
; RUN: llvm-link %t2.bc %t1.bc -S | FileCheck %s | ||
|
||
|
||
; CHECK: !0 = !{i32 1, !"Objective-C Image Info Version", i32 0} | ||
; CHECK: !1 = !{i32 4, !"Objective-C Class Properties", i32 0} | ||
|
||
|
||
|
||
!llvm.module.flags = !{!0} | ||
|
||
!0 = !{i32 1, !"Objective-C Image Info Version", i32 0} |