aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-01 23:08:02 +0000
committerChris Lattner <sabre@nondot.org>2010-11-01 23:08:02 +0000
commit4c9f4e4002bfdb059684a8dafef8993a5ec27a23 (patch)
tree5a4bd0b3f715690b78590989d831f49caef9681b /utils
parentefd8dadb4f5849e814fe9c2cf95f31efd28f48bd (diff)
downloadexternal_llvm-4c9f4e4002bfdb059684a8dafef8993a5ec27a23.zip
external_llvm-4c9f4e4002bfdb059684a8dafef8993a5ec27a23.tar.gz
external_llvm-4c9f4e4002bfdb059684a8dafef8993a5ec27a23.tar.bz2
give MatchableInfo::Operand a constructor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117968 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/AsmMatcherEmitter.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp
index f422106..7f653a3 100644
--- a/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/utils/TableGen/AsmMatcherEmitter.cpp
@@ -329,6 +329,9 @@ struct MatchableInfo {
/// The original operand this corresponds to, if any.
const CGIOperandList::OperandInfo *OperandInfo;
+
+ Operand(ClassInfo *C, const CGIOperandList::OperandInfo *OpInfo)
+ : Class(C), OperandInfo(OpInfo) {}
};
/// InstrName - The target name for this instruction.
@@ -1006,9 +1009,7 @@ void AsmMatcherInfo::BuildInfo() {
// Check for singleton registers.
if (Record *RegRecord = II->getSingletonRegisterForToken(i, *this)) {
- MatchableInfo::Operand Op;
- Op.Class = RegisterClasses[RegRecord];
- Op.OperandInfo = 0;
+ MatchableInfo::Operand Op(RegisterClasses[RegRecord], 0);
assert(Op.Class && Op.Class->Registers.size() == 1 &&
"Unexpected class for singleton register");
II->Operands.push_back(Op);
@@ -1017,10 +1018,7 @@ void AsmMatcherInfo::BuildInfo() {
// Check for simple tokens.
if (Token[0] != '$') {
- MatchableInfo::Operand Op;
- Op.Class = getTokenClass(Token);
- Op.OperandInfo = 0;
- II->Operands.push_back(Op);
+ II->Operands.push_back(MatchableInfo::Operand(getTokenClass(Token), 0));
continue;
}
@@ -1057,10 +1055,8 @@ void AsmMatcherInfo::BuildInfo() {
assert(OI && "Unable to find tied operand target!");
}
- MatchableInfo::Operand Op;
- Op.Class = getOperandClass(Token, *OI);
- Op.OperandInfo = OI;
- II->Operands.push_back(Op);
+ II->Operands.push_back(MatchableInfo::Operand(getOperandClass(Token,
+ *OI), OI));
}
}