summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit8cab021ca28441e532e312ff8f04e2c4a9075ade (patch)
treee2a6ab573fb70895ba323fb4143c7bc10e980766 /llvm/utils/TableGen/CodeGenTarget.cpp
parent22950d26f5f1708f4bb667543bc5cddced263e4b (diff)
downloadbcm5719-llvm-8cab021ca28441e532e312ff8f04e2c4a9075ade.tar.gz
bcm5719-llvm-8cab021ca28441e532e312ff8f04e2c4a9075ade.zip
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. llvm-svn: 45632
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenTarget.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp
index 319637c7879..2688914d1e8 100644
--- a/llvm/utils/TableGen/CodeGenTarget.cpp
+++ b/llvm/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.
///
OpenPOWER on IntegriCloud