llvm.org GIT mirror llvm / dbe4006
Ignore entries with blank names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32491 91177308-0d34-0410-b5e6-96231b3b80d8 Jim Laskey 13 years ago
1 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
8686 << "static llvm::SubtargetFeatureKV FeatureKV[] = {\n";
8787
8888 // For each feature
89 for (unsigned i = 0, N = FeatureList.size(); i < N;) {
89 for (unsigned i = 0, N = FeatureList.size(); i < N; ++i) {
9090 // Next feature
9191 Record *Feature = FeatureList[i];
9292
9393 std::string Name = Feature->getName();
9494 std::string CommandLineName = Feature->getValueAsString("Name");
9595 std::string Desc = Feature->getValueAsString("Desc");
96
97 if (CommandLineName.empty()) continue;
9698
9799 // Emit as { "feature", "decription", feactureEnum }
98100 OS << " { "
102104 << " }";
103105
104106 // Depending on 'if more in the list' emit comma
105 if (++i < N) OS << ",";
107 if ((i + 1) < N) OS << ",";
106108
107109 OS << "\n";
108110 }