Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoUpgrade] Fix a compatibility issue with module flag
Summary: After r304661, module flag to record objective-c image info section is encoded without whitespaces after comma. The new name is equivalent to the old one, except that when LTO a module built by old compiler and a module built by a new compiler, it will fail with conflicting values. Fix the issue by removing whitespaces in bitcode upgrade path. rdar://problem/34416934 Reviewers: compnerd Reviewed By: compnerd Subscribers: mehdi_amini, hans, llvm-commits Differential Revision: https://reviews.llvm.org/D37909 llvm-svn: 313398
- Loading branch information
1 parent
1efbe2e
commit ab211df
Showing
2 changed files
with
22 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
; RUN: llvm-as < %s | llvm-dis | FileCheck %s | ||
; RUN: verify-uselistorder < %s | ||
|
||
!llvm.module.flags = !{!0, !1, !2} | ||
!llvm.module.flags = !{!0, !1, !2, !3} | ||
|
||
!0 = !{i32 1, !"PIC Level", i32 1} | ||
!1 = !{i32 1, !"PIE Level", i32 1} | ||
!2 = !{i32 1, !"Objective-C Image Info Version", i32 0} | ||
!3 = !{i32 1, !"Objective-C Image Info Section", !"__DATA, __objc_imageinfo, regular, no_dead_strip"} | ||
|
||
; CHECK: !0 = !{i32 7, !"PIC Level", i32 1} | ||
; CHECK: !1 = !{i32 7, !"PIE Level", i32 1} | ||
; CHECK: !2 = !{i32 1, !"Objective-C Image Info Version", i32 0} | ||
; CHECK: !3 = !{i32 4, !"Objective-C Class Properties", i32 0} | ||
; CHECK: !3 = !{i32 1, !"Objective-C Image Info Section", !"__DATA,__objc_imageinfo,regular,no_dead_strip"} | ||
; CHECK: !4 = !{i32 4, !"Objective-C Class Properties", i32 0} |