diff options
author | Chris Lattner <sabre@nondot.org> | 2006-06-20 00:56:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-06-20 00:56:37 +0000 |
commit | 02cdb377eca9fedd28180fa396222e78c8e7134a (patch) | |
tree | e54e03c59bab553988f0b8e8b5c115326c3e5091 | |
parent | 4e85e64007e8561558e7d3e05a59cbfcc48d5bcc (diff) |
Fix an error message regression. Print:
LI8: (LI8:i64 (imm:i64):$imm)
instead of:
LI8: (LI8:MVT::i64 (imm:MVT::i64):$imm)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28868 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | utils/TableGen/DAGISelEmitter.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index 5983fb7c02..d478a1e680 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -436,7 +436,14 @@ void TreePatternNode::print(std::ostream &OS) const { case MVT::isFP : OS << ":isFP"; break; case MVT::isUnknown: ; /*OS << ":?";*/ break; case MVT::iPTR: OS << ":iPTR"; break; - default: OS << ":" << getTypeNum(0); break; + default: { + std::string VTName = llvm::getName(getTypeNum(0)); + // Strip off MVT:: prefix if present. + if (VTName.substr(0,5) == "MVT::") + VTName = VTName.substr(5); + OS << ":" << VTName; + break; + } } if (!isLeaf()) { |