[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp
Chris Lattner
sabre at nondot.org
Tue Nov 14 13:32:15 PST 2006
Changes in directory llvm/utils/TableGen:
DAGISelEmitter.cpp updated: 1.283 -> 1.284
---
Log message:
Add support for nodes that return iPTR.
---
Diffs of the changes: (+6 -4)
DAGISelEmitter.cpp | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.283 llvm/utils/TableGen/DAGISelEmitter.cpp:1.284
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.283 Tue Nov 14 15:18:40 2006
+++ llvm/utils/TableGen/DAGISelEmitter.cpp Tue Nov 14 15:32:01 2006
@@ -3601,8 +3601,11 @@
}
// Print function.
- std::string OpVTStr = (OpVT != MVT::isVoid && OpVT != MVT::iPTR)
- ? getEnumName(OpVT).substr(5) : "" ;
+ std::string OpVTStr;
+ if (OpVT == MVT::iPTR)
+ OpVTStr = "iPTR";
+ else
+ OpVTStr = getEnumName(OpVT).substr(5); // Skip 'MVT::'
std::map<std::string, std::vector<std::string> >::iterator OpVTI =
OpcodeVTMap.find(OpName);
if (OpVTI == OpcodeVTMap.end()) {
@@ -3613,8 +3616,7 @@
OpVTI->second.push_back(OpVTStr);
OS << "SDNode *Select_" << getLegalCName(OpName)
- << (OpVTStr != "" ? "_" : "")
- << OpVTStr << "(const SDOperand &N) {\n";
+ << "_" << OpVTStr << "(const SDOperand &N) {\n";
// Loop through and reverse all of the CodeList vectors, as we will be
// accessing them from their logical front, but accessing the end of a
More information about the llvm-commits
mailing list