diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-05 22:25:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-05 22:25:12 +0000 |
commit | 8cab021ca28441e532e312ff8f04e2c4a9075ade (patch) | |
tree | e2a6ab573fb70895ba323fb4143c7bc10e980766 /llvm/utils/TableGen/CodeGenTarget.cpp | |
parent | 22950d26f5f1708f4bb667543bc5cddced263e4b (diff) | |
download | bcm5719-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.cpp | 11 |
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. /// |