aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenTarget.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-05 22:25:12 +0000
committerChris Lattner <sabre@nondot.org>2008-01-05 22:25:12 +0000
commit6cefb77a7073057fecd721ae141140d75ce76512 (patch)
treebe85f322799be552a691ad6f696f429049fd512f /utils/TableGen/CodeGenTarget.cpp
parent219f67f0a5f07032f06e36c71fdb84188cc29fdb (diff)
change getQualifiedName to be a global function.
Split the pattern parsing code out from the dag isel emitter into it's own file. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45632 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--utils/TableGen/CodeGenTarget.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index 319637c787..2688914d1e 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -106,6 +106,17 @@ std::string llvm::getEnumName(MVT::ValueType T) {
}
}
+/// getQualifiedName - Return the name of the specified record, with a
+/// namespace qualifier if the record contains one.
+///
+std::string llvm::getQualifiedName(const Record *R) {
+ std::string Namespace = R->getValueAsString("Namespace");
+ if (Namespace.empty()) return R->getName();
+ return Namespace + "::" + R->getName();
+}
+
+
+
/// getTarget - Return the current instance of the Target class.
///