From 81669d5ead6fa555f13308771a6d4cd97f9a73c5 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Fri, 20 Sep 2019 14:32:34 +0000 Subject: [TextAPI] Arch&Platform to Target Summary: This is a patch for updating TextAPI/Macho to read in targets as opposed to arch/platform. This is because in previous versions tbd files only supported a single platform but that is no longer the case, so, now its tracked by unique triples. This precedes a seperate patch that will add the TBD-v4 format Reviewers: ributzka, steven_wu, plotfi, compnerd, smeenai Reviewed By: ributzka Subscribers: mgorny, hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67527 llvm-svn: 372396 --- llvm/lib/TextAPI/MachO/Symbol.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'llvm/lib/TextAPI/MachO/Symbol.cpp') diff --git a/llvm/lib/TextAPI/MachO/Symbol.cpp b/llvm/lib/TextAPI/MachO/Symbol.cpp index 731b264f608..9f2d8172bee 100644 --- a/llvm/lib/TextAPI/MachO/Symbol.cpp +++ b/llvm/lib/TextAPI/MachO/Symbol.cpp @@ -45,5 +45,14 @@ LLVM_DUMP_METHOD void Symbol::dump(raw_ostream &OS) const { } #endif +Symbol::const_filtered_target_range +Symbol::targets(ArchitectureSet Architectures) const { + std::function FN = + [Architectures](const Target &Target) { + return Architectures.has(Target.Arch); + }; + return make_filter_range(Targets, FN); +} + } // end namespace MachO. } // end namespace llvm. -- cgit v1.2.3