mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 13:10:34 +00:00
Ignore entries with blank names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32491 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7b2b5c846c
commit
dbe4006cf3
@ -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";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user