summaryrefslogtreecommitdiffstats
path: root/test/Bitcode
diff options
context:
space:
mode:
authorSteven Wu <stevenwu@apple.com>2017-08-21 21:49:13 +0000
committerSteven Wu <stevenwu@apple.com>2017-08-21 21:49:13 +0000
commitd900cd5e448eac86844bf09436cfc99c04df54b0 (patch)
tree2c44a96b561e77dc80119b5023cce970c9b01b7a /test/Bitcode
parent854f9175285330ee09ccb5a3ff448bd6883111f3 (diff)
[IR] AutoUpgrade ModuleFlagBehavior for PIC and PIE level
Summary: From r303590, ModuleFlagBehavior for PIC and PIE level is changed from Error to Max. This will cause bitcode compatibility issue when linking against a bitcode static archive built with old compiler. Add an auto-ugprade path to upgrade the the ModuleFlagBehavior in the old bitcode to match the new one so IRLinker can link them. Reviewers: tejohnson, mehdi_amini, dexonsmith Reviewed By: dexonsmith Subscribers: hans, llvm-commits Differential Revision: https://reviews.llvm.org/D36556 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311387 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Bitcode')
-rw-r--r--test/Bitcode/upgrade-module-flag.ll12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/Bitcode/upgrade-module-flag.ll b/test/Bitcode/upgrade-module-flag.ll
index d6741faa837f..de6c9b2cf1bb 100644
--- a/test/Bitcode/upgrade-module-flag.ll
+++ b/test/Bitcode/upgrade-module-flag.ll
@@ -1,9 +1,13 @@
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: verify-uselistorder < %s
-!llvm.module.flags = !{!0}
+!llvm.module.flags = !{!0, !1, !2}
-!0 = !{i32 1, !"Objective-C Image Info Version", i32 0}
+!0 = !{i32 1, !"PIC Level", i32 1}
+!1 = !{i32 1, !"PIE Level", i32 1}
+!2 = !{i32 1, !"Objective-C Image Info Version", i32 0}
-; CHECK: !0 = !{i32 1, !"Objective-C Image Info Version", i32 0}
-; CHECK: !1 = !{i32 4, !"Objective-C Class Properties", i32 0}
+; 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}