summaryrefslogtreecommitdiff
path: root/utils/TableGen/InstrInfoEmitter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-07 05:39:09 +0000
committerChris Lattner <sabre@nondot.org>2003-08-07 05:39:09 +0000
commit7884b750c33b750177b3f22af75c874c97f728d8 (patch)
treef9142d6bcea24679fc28a067e51992b6cfd6a5cf /utils/TableGen/InstrInfoEmitter.cpp
parent45872079672a4fb500fdcb9c77b23e3e550c8f97 (diff)
downloadllvm-7884b750c33b750177b3f22af75c874c97f728d8.tar.gz
llvm-7884b750c33b750177b3f22af75c874c97f728d8.tar.bz2
llvm-7884b750c33b750177b3f22af75c874c97f728d8.tar.xz
Start using the CodeGeneratorWrappers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/InstrInfoEmitter.cpp')
-rw-r--r--utils/TableGen/InstrInfoEmitter.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp
index ad501dc426..c794cd0441 100644
--- a/utils/TableGen/InstrInfoEmitter.cpp
+++ b/utils/TableGen/InstrInfoEmitter.cpp
@@ -6,6 +6,7 @@
//===----------------------------------------------------------------------===//
#include "InstrInfoEmitter.h"
+#include "CodeGenWrappers.h"
#include "Record.h"
// runEnums - Print out enum values for all of the instructions.
@@ -23,9 +24,10 @@ void InstrInfoEmitter::runEnums(std::ostream &OS) {
OS << "namespace " << Namespace << " {\n";
OS << " enum {\n";
+ CodeGenTarget Target;
+
// We must emit the PHI opcode first...
- Record *Target = getTarget(Records);
- Record *InstrInfo = Target->getValueAsDef("InstructionSet");
+ Record *InstrInfo = Target.getInstructionSet();
Record *PHI = InstrInfo->getValueAsDef("PHIInst");
OS << " " << PHI->getName() << ", \t// 0 (fixed for all targets)\n";
@@ -55,9 +57,9 @@ void InstrInfoEmitter::printDefList(ListInit *LI, const std::string &Name,
// run - Emit the main instruction description records for the target...
void InstrInfoEmitter::run(std::ostream &OS) {
EmitSourceFileHeader("Target Instruction Descriptors", OS);
- Record *Target = getTarget(Records);
- const std::string &TargetName = Target->getName();
- Record *InstrInfo = Target->getValueAsDef("InstructionSet");
+ CodeGenTarget Target;
+ const std::string &TargetName = Target.getName();
+ Record *InstrInfo = Target.getInstructionSet();
Record *PHI = InstrInfo->getValueAsDef("PHIInst");
std::vector<Record*> Instructions =