mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
eliminate the old InstFormatName which is always "AsmString",
simplify CodeGenInstruction. No functionality change. llvm-svn: 117891
This commit is contained in:
parent
a8d1d91f41
commit
d57d9e862d
@ -593,10 +593,6 @@ class AsmWriter {
|
||||
// name.
|
||||
string AsmWriterClassName = "AsmPrinter";
|
||||
|
||||
// InstFormatName - AsmWriters can specify the name of the format string to
|
||||
// print instructions with.
|
||||
string InstFormatName = "AsmString";
|
||||
|
||||
// Variant - AsmWriters can be of multiple different variants. Variants are
|
||||
// used to support targets that need to emit assembly code in ways that are
|
||||
// mostly the same for different targets, but have minor differences in
|
||||
|
@ -95,9 +95,9 @@ static void ParseConstraints(const std::string &CStr, CodeGenInstruction *I) {
|
||||
}
|
||||
}
|
||||
|
||||
CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
|
||||
: TheDef(R), AsmString(AsmStr) {
|
||||
CodeGenInstruction::CodeGenInstruction(Record *R) : TheDef(R) {
|
||||
Namespace = R->getValueAsString("Namespace");
|
||||
AsmString = R->getValueAsString("AsmString");
|
||||
|
||||
isReturn = R->getValueAsBit("isReturn");
|
||||
isBranch = R->getValueAsBit("isBranch");
|
||||
|
@ -185,7 +185,7 @@ namespace llvm {
|
||||
return false;
|
||||
}
|
||||
|
||||
CodeGenInstruction(Record *R, const std::string &AsmStr);
|
||||
CodeGenInstruction(Record *R);
|
||||
|
||||
/// getOperandNamed - Return the index of the operand with the specified
|
||||
/// non-empty name. If the instruction does not have an operand with the
|
||||
|
@ -295,13 +295,8 @@ void CodeGenTarget::ReadInstructions() const {
|
||||
throw std::string("No 'Instruction' subclasses defined!");
|
||||
|
||||
// Parse the instructions defined in the .td file.
|
||||
std::string InstFormatName =
|
||||
getAsmWriter()->getValueAsString("InstFormatName");
|
||||
|
||||
for (unsigned i = 0, e = Insts.size(); i != e; ++i) {
|
||||
std::string AsmStr = Insts[i]->getValueAsString(InstFormatName);
|
||||
Instructions[Insts[i]] = new CodeGenInstruction(Insts[i], AsmStr);
|
||||
}
|
||||
for (unsigned i = 0, e = Insts.size(); i != e; ++i)
|
||||
Instructions[Insts[i]] = new CodeGenInstruction(Insts[i]);
|
||||
}
|
||||
|
||||
static const CodeGenInstruction *
|
||||
|
Loading…
x
Reference in New Issue
Block a user