summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TextAPI/MachO/TextStub.cpp
diff options
context:
space:
mode:
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 1f1d39ee018..78c9f54ba22 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;
}
OpenPOWER on IntegriCloud