aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
authorSteven Wu <stevenwu@apple.com>2024-05-21 09:15:37 -0700
committerGitHub <noreply@github.com>2024-05-21 09:15:37 -0700
commit7c19058d2a8e05383988b92cf4004c4cd8a54951 (patch)
tree49ca4bcfada1ac6b3295d4ceb3aa9e66e82aa430 /llvm/lib/IR/Module.cpp
parent76748119bfd52ff6647740a06e29e3584e22ee16 (diff)
downloadllvm-7c19058d2a8e05383988b92cf4004c4cd8a54951.zip
llvm-7c19058d2a8e05383988b92cf4004c4cd8a54951.tar.gz
llvm-7c19058d2a8e05383988b92cf4004c4cd8a54951.tar.bz2
[Darwin][IR] Don't error on target_variant mismatch when linking IR (#92297)
Change the ModuleFlag type for target_variant to warning to avoid error out when the value is different. This matches the linker behavior when linking object files. rdar://125874272
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r--llvm/lib/IR/Module.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index a8696ed..f97dd18 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -882,7 +882,7 @@ StringRef Module::getDarwinTargetVariantTriple() const {
}
void Module::setDarwinTargetVariantTriple(StringRef T) {
- addModuleFlag(ModFlagBehavior::Override, "darwin.target_variant.triple",
+ addModuleFlag(ModFlagBehavior::Warning, "darwin.target_variant.triple",
MDString::get(getContext(), T));
}