summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2017-12-28 16:58:54 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2017-12-28 16:58:54 +0000
commit3a13ed60ba26194b8fce1f69d62c87835ca2dfb0 (patch)
tree63e58f5dcc076c6988d1f2a62445f5b0d3346b65 /llvm/utils/TableGen/CodeGenDAGPatterns.cpp
parentb4c5c2dd15371ab1a1d33049a7f3ea7ac4c79da6 (diff)
downloadbcm5719-llvm-3a13ed60ba26194b8fce1f69d62c87835ca2dfb0.tar.gz
bcm5719-llvm-3a13ed60ba26194b8fce1f69d62c87835ca2dfb0.zip
Avoid int to string conversion in Twine or raw_ostream contexts.
Some output changes from uppercase hex to lowercase hex, no other functionality change intended. llvm-svn: 321526
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenDAGPatterns.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
index 7755cd1be35..64cf2331449 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -1873,7 +1873,7 @@ TreePatternNode *TreePatternNode::InlinePatternFragments(TreePattern &TP) {
// Verify that we are passing the right number of operands.
if (Frag->getNumArgs() != Children.size()) {
TP.error("'" + Op->getName() + "' fragment requires " +
- utostr(Frag->getNumArgs()) + " operands!");
+ Twine(Frag->getNumArgs()) + " operands!");
return nullptr;
}
@@ -2195,7 +2195,7 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
SignBitAndAbove == 1)
continue;
- TP.error("Integer value '" + itostr(II->getValue()) +
+ TP.error("Integer value '" + Twine(II->getValue()) +
"' is out of range for type '" + getEnumName(VT) + "'!");
break;
}
@@ -2245,9 +2245,8 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
MadeChange |= UpdateNodeType(i, Int->IS.RetVTs[i], TP);
if (getNumChildren() != NumParamVTs + 1) {
- TP.error("Intrinsic '" + Int->Name + "' expects " +
- utostr(NumParamVTs) + " operands, not " +
- utostr(getNumChildren() - 1) + " operands!");
+ TP.error("Intrinsic '" + Int->Name + "' expects " + Twine(NumParamVTs) +
+ " operands, not " + Twine(getNumChildren() - 1) + " operands!");
return false;
}
@@ -2271,7 +2270,7 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
if (NI.getNumOperands() >= 0 &&
getNumChildren() != (unsigned)NI.getNumOperands()) {
TP.error(getOperator()->getName() + " node requires exactly " +
- itostr(NI.getNumOperands()) + " operands!");
+ Twine(NI.getNumOperands()) + " operands!");
return false;
}
@@ -2340,7 +2339,7 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
TreePatternNode *SubIdxChild = getChild(I + 1);
if (!isOperandClass(SubIdxChild, "SubRegIndex")) {
TP.error("REG_SEQUENCE requires a SubRegIndex for operand " +
- itostr(I + 1) + "!");
+ Twine(I + 1) + "!");
return false;
}
}
@@ -3514,7 +3513,7 @@ const DAGInstruction &CodeGenDAGPatterns::parseInstructionPattern(
CGIOperandList::OperandInfo &Op = CGI.Operands[i];
const std::string &OpName = Op.Name;
if (OpName.empty())
- I->error("Operand #" + utostr(i) + " in operands list has no name!");
+ I->error("Operand #" + Twine(i) + " in operands list has no name!");
if (!InstInputsCheck.count(OpName)) {
// If this is an operand with a DefaultOps set filled in, we can ignore
OpenPOWER on IntegriCloud