summaryrefslogtreecommitdiff
path: root/utils/TableGen/Record.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-10 22:14:13 +0000
committerChris Lattner <sabre@nondot.org>2003-08-10 22:14:13 +0000
commit91290d7e9a743de363049e705a8303ae1f3a6e68 (patch)
treed012eb1b18e0fb6cbebba8c6960b33fc5f8b5ee5 /utils/TableGen/Record.cpp
parentfb9ea58eb1ad43b9a82f658230b91b9e5767cba1 (diff)
downloadllvm-91290d7e9a743de363049e705a8303ae1f3a6e68.tar.gz
llvm-91290d7e9a743de363049e705a8303ae1f3a6e68.tar.bz2
llvm-91290d7e9a743de363049e705a8303ae1f3a6e68.tar.xz
Implement correct parsing, representation, and printing of DAG argument names
Implements testcase TableGen/TreeNames.td git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7713 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/Record.cpp')
-rw-r--r--utils/TableGen/Record.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/TableGen/Record.cpp b/utils/TableGen/Record.cpp
index a76c55cfb6..384005081e 100644
--- a/utils/TableGen/Record.cpp
+++ b/utils/TableGen/Record.cpp
@@ -438,8 +438,11 @@ void DagInit::print(std::ostream &OS) const {
OS << "(" << NodeTypeDef->getName();
if (Args.size()) {
OS << " " << *Args[0];
- for (unsigned i = 1, e = Args.size(); i != e; ++i)
+ if (!ArgNames[0].empty()) OS << ":$" << ArgNames[0];
+ for (unsigned i = 1, e = Args.size(); i != e; ++i) {
OS << ", " << *Args[i];
+ if (!ArgNames[i].empty()) OS << ":$" << ArgNames[i];
+ }
}
OS << ")";
}