aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/TextStubV5.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/TextAPI/TextStubV5.cpp')
-rw-r--r--llvm/lib/TextAPI/TextStubV5.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/TextAPI/TextStubV5.cpp b/llvm/lib/TextAPI/TextStubV5.cpp
index a9355fab..ade4c86 100644
--- a/llvm/lib/TextAPI/TextStubV5.cpp
+++ b/llvm/lib/TextAPI/TextStubV5.cpp
@@ -293,8 +293,10 @@ Expected<TargetList> getTargetsSection(const Object *Section) {
if (!TargetOrErr)
return make_error<JSONStubError>(getParseErrorMsg(TBDKey::Target));
TargetOrErr->MinDeployment = Version;
-
- IFTargets.push_back(*TargetOrErr);
+ // Convert to LLVM::Triple to accurately compute minOS + platform + arch
+ // pairing.
+ IFTargets.push_back(
+ MachO::Target(Triple(getTargetTripleName(*TargetOrErr))));
}
return std::move(IFTargets);
}