diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-12-12 20:55:58 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-12-12 20:55:58 +0000 |
commit | dbe4006cf3cf0802dc318a5f2070c04c326e170b (patch) | |
tree | a50f4239e2763a4407c5dd26eb255622e414a496 /utils | |
parent | 7b2b5c846c371f58db73f453a007e52eda62da89 (diff) | |
download | llvm-dbe4006cf3cf0802dc318a5f2070c04c326e170b.tar.gz llvm-dbe4006cf3cf0802dc318a5f2070c04c326e170b.tar.bz2 llvm-dbe4006cf3cf0802dc318a5f2070c04c326e170b.tar.xz |
Ignore entries with blank names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32491 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/SubtargetEmitter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/TableGen/SubtargetEmitter.cpp b/utils/TableGen/SubtargetEmitter.cpp index a70dbc9728..6cc28d7c7f 100644 --- a/utils/TableGen/SubtargetEmitter.cpp +++ b/utils/TableGen/SubtargetEmitter.cpp @@ -87,7 +87,7 @@ void SubtargetEmitter::FeatureKeyValues(std::ostream &OS) { << "static llvm::SubtargetFeatureKV FeatureKV[] = {\n"; // For each feature - for (unsigned i = 0, N = FeatureList.size(); i < N;) { + for (unsigned i = 0, N = FeatureList.size(); i < N; ++i) { // Next feature Record *Feature = FeatureList[i]; @@ -95,6 +95,8 @@ void SubtargetEmitter::FeatureKeyValues(std::ostream &OS) { std::string CommandLineName = Feature->getValueAsString("Name"); std::string Desc = Feature->getValueAsString("Desc"); + if (CommandLineName.empty()) continue; + // Emit as { "feature", "decription", feactureEnum } OS << " { " << "\"" << CommandLineName << "\", " @@ -103,7 +105,7 @@ void SubtargetEmitter::FeatureKeyValues(std::ostream &OS) { << " }"; // Depending on 'if more in the list' emit comma - if (++i < N) OS << ","; + if ((i + 1) < N) OS << ","; OS << "\n"; } |