diff options
author | Chris Lattner <sabre@nondot.org> | 2006-11-14 21:32:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-11-14 21:32:01 +0000 |
commit | ab51ddd7c0a35c6d5e4f6614a9c5a8a87ecfe55b (patch) | |
tree | 60f30700e9ee30955215475a4d0484e9f85d51a3 /utils | |
parent | 646085dde967b61aa705479915f2dd1fa9fc1186 (diff) | |
download | llvm-ab51ddd7c0a35c6d5e4f6614a9c5a8a87ecfe55b.tar.gz llvm-ab51ddd7c0a35c6d5e4f6614a9c5a8a87ecfe55b.tar.bz2 llvm-ab51ddd7c0a35c6d5e4f6614a9c5a8a87ecfe55b.tar.xz |
Add support for nodes that return iPTR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31739 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/DAGISelEmitter.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index b4d5518ca5..8f54d7c0ef 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -3601,8 +3601,11 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) { } // 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 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) { 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 |