Lines Matching defs:Targets
21 iterator_range<TargetRegistry::iterator> TargetRegistry::targets() {
34 std::find_if(targets().begin(), targets().end(),
37 if (I == targets().end()) {
66 // Provide special warning when no targets are initialized.
67 if (targets().begin() == targets().end()) {
68 Error = "Unable to find target for this triple (no targets are registered)";
73 auto I = std::find_if(targets().begin(), targets().end(), ArchMatch);
75 if (I == targets().end()) {
76 Error = "No available targets are compatible with this triple, "
77 "see -version for the available targets.";
81 auto J = std::find_if(std::next(I), targets().end(), ArchMatch);
82 if (J != targets().end()) {
83 Error = std::string("Cannot choose between targets \"") + I->Name +
104 // Add to the list of targets.
120 std::vector<std::pair<StringRef, const Target*> > Targets;
122 for (const auto &T : TargetRegistry::targets()) {
123 Targets.push_back(std::make_pair(T.getName(), &T));
124 Width = std::max(Width, Targets.back().first.size());
126 array_pod_sort(Targets.begin(), Targets.end(), TargetArraySortFn);
129 OS << " Registered Targets:\n";
130 for (unsigned i = 0, e = Targets.size(); i != e; ++i) {
131 OS << " " << Targets[i].first;
132 OS.indent(Width - Targets[i].first.size()) << " - "
133 << Targets[i].second->getShortDescription() << '\n';
135 if (Targets.empty())