Skip to content

Commit

Permalink
[MC][TableGen] Fix r329675.
Browse files Browse the repository at this point in the history
Caught by bots with -Wmissing-braces.

llvm-svn: 329676
  • Loading branch information
legrosbuffle committed Apr 10, 2018
1 parent b449379 commit bfa20dd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions llvm/utils/TableGen/SubtargetEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,18 +724,20 @@ static bool EmitPfmIssueCountersTable(const CodeGenProcModel &ProcModel,

static void EmitPfmCounters(const CodeGenProcModel &ProcModel,
const bool HasPfmIssueCounters, raw_ostream &OS) {
OS << " {\n";
// Emit the cycle counter.
if (ProcModel.PfmCycleCounterDef)
OS << " \"" << ProcModel.PfmCycleCounterDef->getValueAsString("Counter")
OS << " \"" << ProcModel.PfmCycleCounterDef->getValueAsString("Counter")
<< "\", // Cycle counter.\n";
else
OS << " nullptr, // No cycle counter.\n";
OS << " nullptr, // No cycle counter.\n";

// Emit a reference to issue counters table.
if (HasPfmIssueCounters)
OS << " " << ProcModel.ModelName << "PfmIssueCounters\n";
OS << " " << ProcModel.ModelName << "PfmIssueCounters\n";
else
OS << " nullptr, // No issue counters.\n";
OS << " nullptr // No issue counters.\n";
OS << " }\n";
}

void SubtargetEmitter::EmitExtraProcessorInfo(const CodeGenProcModel &ProcModel,
Expand Down

0 comments on commit bfa20dd

Please sign in to comment.