final cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45644 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2008-01-06 01:21:51 +00:00
parent ef8339b11a
commit 5fbe275304
2 changed files with 8 additions and 9 deletions

View File

@@ -19,8 +19,8 @@
#include <iostream>
using namespace llvm;
void InstrInfoEmitter::printDefList(const std::vector<Record*> &Uses,
unsigned Num, std::ostream &OS) const {
static void PrintDefList(const std::vector<Record*> &Uses,
unsigned Num, std::ostream &OS) {
OS << "static const unsigned ImplicitList" << Num << "[] = { ";
for (unsigned i = 0, e = Uses.size(); i != e; ++i)
OS << getQualifiedName(Uses[i]) << ", ";
@@ -163,12 +163,12 @@ void InstrInfoEmitter::run(std::ostream &OS) {
std::vector<Record*> Uses = Inst->getValueAsListOfDefs("Uses");
if (!Uses.empty()) {
unsigned &IL = EmittedLists[Uses];
if (!IL) printDefList(Uses, IL = ++ListNumber, OS);
if (!IL) PrintDefList(Uses, IL = ++ListNumber, OS);
}
std::vector<Record*> Defs = Inst->getValueAsListOfDefs("Defs");
if (!Defs.empty()) {
unsigned &IL = EmittedLists[Defs];
if (!IL) printDefList(Defs, IL = ++ListNumber, OS);
if (!IL) PrintDefList(Defs, IL = ++ListNumber, OS);
}
}