[llvm-commits] [llvm] r78462 - /llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Aug 8 03:06:31 PDT 2009
Author: d0k
Date: Sat Aug 8 05:06:30 2009
New Revision: 78462
URL: http://llvm.org/viewvc/llvm-project?rev=78462&view=rev
Log:
MSVC doesn't like member variables with the same name as the class.
Modified:
llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
Modified: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp?rev=78462&r1=78461&r2=78462&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Sat Aug 8 05:06:30 2009
@@ -307,7 +307,7 @@
ClassInfo *Class;
/// The original operand this corresponds to, if any.
- const CodeGenInstruction::OperandInfo *Operand;
+ const CodeGenInstruction::OperandInfo *OperandInfo;
};
/// InstrName - The target name for this instruction.
@@ -384,7 +384,7 @@
continue;
}
- const CodeGenInstruction::OperandInfo &OI = *Op.Operand;
+ const CodeGenInstruction::OperandInfo &OI = *Op.OperandInfo;
errs() << OI.Name << " " << OI.Rec->getName()
<< " (" << OI.MIOperandNo << ", " << OI.MINumOperands << ")\n";
}
@@ -501,7 +501,7 @@
if (Token[0] != '$') {
InstructionInfo::Operand Op;
Op.Class = getTokenClass(Token);
- Op.Operand = 0;
+ Op.OperandInfo = 0;
II->Operands.push_back(Op);
continue;
}
@@ -525,7 +525,7 @@
const CodeGenInstruction::OperandInfo &OI = CGI.OperandList[Idx];
InstructionInfo::Operand Op;
Op.Class = getOperandClass(Token, OI);
- Op.Operand = &OI;
+ Op.OperandInfo = &OI;
II->Operands.push_back(Op);
}
@@ -574,8 +574,8 @@
SmallVector<std::pair<unsigned, unsigned>, 4> MIOperandList;
for (unsigned i = 0, e = II.Operands.size(); i != e; ++i) {
InstructionInfo::Operand &Op = II.Operands[i];
- if (Op.Operand)
- MIOperandList.push_back(std::make_pair(Op.Operand->MIOperandNo, i));
+ if (Op.OperandInfo)
+ MIOperandList.push_back(std::make_pair(Op.OperandInfo->MIOperandNo, i));
}
std::sort(MIOperandList.begin(), MIOperandList.end());
@@ -592,7 +592,7 @@
unsigned CurIndex = 0;
for (unsigned i = 0, e = MIOperandList.size(); i != e; ++i) {
InstructionInfo::Operand &Op = II.Operands[MIOperandList[i].second];
- assert(CurIndex <= Op.Operand->MIOperandNo &&
+ assert(CurIndex <= Op.OperandInfo->MIOperandNo &&
"Duplicate match for instruction operand!");
Signature += "_";
@@ -601,14 +601,14 @@
// .td file encodes "implicit" operands as explicit ones.
//
// FIXME: This should be removed from the MCInst structure.
- for (; CurIndex != Op.Operand->MIOperandNo; ++CurIndex)
+ for (; CurIndex != Op.OperandInfo->MIOperandNo; ++CurIndex)
Signature += "Imp";
Signature += Op.Class->Name;
- Signature += utostr(Op.Operand->MINumOperands);
+ Signature += utostr(Op.OperandInfo->MINumOperands);
Signature += "_" + utostr(MIOperandList[i].second);
- CurIndex += Op.Operand->MINumOperands;
+ CurIndex += Op.OperandInfo->MINumOperands;
}
// Add any trailing implicit operands.
@@ -633,13 +633,13 @@
InstructionInfo::Operand &Op = II.Operands[MIOperandList[i].second];
// Add the implicit operands.
- for (; CurIndex != Op.Operand->MIOperandNo; ++CurIndex)
+ for (; CurIndex != Op.OperandInfo->MIOperandNo; ++CurIndex)
CvtOS << " Inst.addOperand(MCOperand::CreateReg(0));\n";
CvtOS << " Operands[" << MIOperandList[i].second
<< "]." << Op.Class->RenderMethod
- << "(Inst, " << Op.Operand->MINumOperands << ");\n";
- CurIndex += Op.Operand->MINumOperands;
+ << "(Inst, " << Op.OperandInfo->MINumOperands << ");\n";
+ CurIndex += Op.OperandInfo->MINumOperands;
}
// And add trailing implicit operands.
More information about the llvm-commits
mailing list