diff options
author | Cyndy Ishida <cyndy_ishida@apple.com> | 2019-09-20 14:32:34 +0000 |
---|---|---|
committer | Cyndy Ishida <cyndy_ishida@apple.com> | 2019-09-20 14:32:34 +0000 |
commit | 81669d5ead6fa555f13308771a6d4cd97f9a73c5 (patch) | |
tree | 7ab3adb03b615d52c00acec032b97e6d0d736e38 /llvm/lib/TextAPI/MachO/Symbol.cpp | |
parent | 084801bdc1a798f30d3ecc183009c74809e051c5 (diff) | |
download | bcm5719-llvm-81669d5ead6fa555f13308771a6d4cd97f9a73c5.tar.gz bcm5719-llvm-81669d5ead6fa555f13308771a6d4cd97f9a73c5.zip |
[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
Diffstat (limited to 'llvm/lib/TextAPI/MachO/Symbol.cpp')
-rw-r--r-- | llvm/lib/TextAPI/MachO/Symbol.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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<bool(const Target &)> FN = + [Architectures](const Target &Target) { + return Architectures.has(Target.Arch); + }; + return make_filter_range(Targets, FN); +} + } // end namespace MachO. } // end namespace llvm. |