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 | 3f7d047a14ad53db7bbf69b47bfab7c7d52a8452 (patch) | |
tree | 3004cb44001eafced99e40ac59e14cdf84c658f7 /llvm/utils/TableGen/SubtargetEmitter.cpp | |
parent | 0076ca0da9bd124506d50c5e6d9616daf0bbf679 (diff) | |
download | bcm5719-llvm-3f7d047a14ad53db7bbf69b47bfab7c7d52a8452.tar.gz bcm5719-llvm-3f7d047a14ad53db7bbf69b47bfab7c7d52a8452.zip |
Ignore entries with blank names.
llvm-svn: 32491
Diffstat (limited to 'llvm/utils/TableGen/SubtargetEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/SubtargetEmitter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/SubtargetEmitter.cpp b/llvm/utils/TableGen/SubtargetEmitter.cpp index a70dbc97287..6cc28d7c7f9 100644 --- a/llvm/utils/TableGen/SubtargetEmitter.cpp +++ b/llvm/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"; } |