aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r--llvm/lib/IR/Module.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index b51ea45..5dd114c 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -596,7 +596,9 @@ PICLevel::Level Module::getPICLevel() const {
}
void Module::setPICLevel(PICLevel::Level PL) {
- addModuleFlag(ModFlagBehavior::Max, "PIC Level", PL);
+ // The merge result of a non-PIC object and a PIC object can only be reliably
+ // used as a non-PIC object, so use the Min merge behavior.
+ addModuleFlag(ModFlagBehavior::Min, "PIC Level", PL);
}
PIELevel::Level Module::getPIELevel() const {