aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/MachO/TextStub.cpp
diff options
context:
space:
mode:
authorCyndy Ishida <cyndy_ishida@apple.com>2019-09-23 15:28:02 +0000
committerCyndy Ishida <cyndy_ishida@apple.com>2019-09-23 15:28:02 +0000
commitd8d99d957c1624ac812d2586a22fdc72f79b758e (patch)
treeed9ec05825ed6916177f12b8c18c32ed79c2f7f4 /llvm/lib/TextAPI/MachO/TextStub.cpp
parentb70323e5d35171ae32ea10ff49e86cdb4b118c30 (diff)
downloadllvm-d8d99d957c1624ac812d2586a22fdc72f79b758e.zip
llvm-d8d99d957c1624ac812d2586a22fdc72f79b758e.tar.gz
llvm-d8d99d957c1624ac812d2586a22fdc72f79b758e.tar.bz2
[TextAPI] Add New Supported Platforms
Summary: This patch introduces simulators, as well was the restriced zippered and macCatalyst to supported platforms Reviewers: ributzka, steven_wu Reviewed By: ributzka Subscribers: hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67528 llvm-svn: 372618
Diffstat (limited to 'llvm/lib/TextAPI/MachO/TextStub.cpp')
-rw-r--r--llvm/lib/TextAPI/MachO/TextStub.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/llvm/lib/TextAPI/MachO/TextStub.cpp b/llvm/lib/TextAPI/MachO/TextStub.cpp
index 1f1d39e..78c9f54 100644
--- a/llvm/lib/TextAPI/MachO/TextStub.cpp
+++ b/llvm/lib/TextAPI/MachO/TextStub.cpp
@@ -399,13 +399,25 @@ template <> struct MappingTraits<const InterfaceFile *> {
}
}
+ // TBD v1 - TBD v3 files only support one platform and several
+ // architectures. It is possible to have more than one platform for TBD v3
+ // files, but the architectures don't apply to all
+ // platforms, specifically to filter out the i386 slice from
+ // platform macCatalyst.
TargetList synthesizeTargets(ArchitectureSet Architectures,
- const PlatformSet &Platforms) {
+ const PlatformSet &Platforms) {
TargetList Targets;
for (auto Platform : Platforms) {
- for (const auto &&Architecture : Architectures)
+ Platform = mapToPlatformKind(Platform, Architectures.hasX86());
+
+ for (const auto &&Architecture : Architectures) {
+ if ((Architecture == AK_i386) &&
+ (Platform == PlatformKind::macCatalyst))
+ continue;
+
Targets.emplace_back(Architecture, Platform);
+ }
}
return Targets;
}