aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/Record.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-01 06:27:59 +0000
committerChris Lattner <sabre@nondot.org>2003-08-01 06:27:59 +0000
commitc7d58024f8bed33e0b3e795e51a62ec30248aff3 (patch)
treef8aedb5f9f052481cbe68d91ab8ba62bff00c1d5 /utils/TableGen/Record.h
parent58c5de16927ea5ba1b454a69ce7ee4fdc371b9f7 (diff)
downloadexternal_llvm-c7d58024f8bed33e0b3e795e51a62ec30248aff3.zip
external_llvm-c7d58024f8bed33e0b3e795e51a62ec30248aff3.tar.gz
external_llvm-c7d58024f8bed33e0b3e795e51a62ec30248aff3.tar.bz2
add support for emitting register classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7473 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/Record.h')
-rw-r--r--utils/TableGen/Record.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h
index 0eaf16f..1729b02 100644
--- a/utils/TableGen/Record.h
+++ b/utils/TableGen/Record.h
@@ -335,6 +335,8 @@ class CodeInit : public Init {
public:
CodeInit(const std::string &V) : Value(V) {}
+ const std::string getValue() const { return Value; }
+
virtual Init *convertInitializerTo(RecTy *Ty) {
return Ty->convertValue(this);
}
@@ -601,6 +603,11 @@ public:
// High-level methods useful to tablegen back-ends
//
+ /// getValueInit - Return the initializer for a value with the specified name,
+ /// or throw an exception if the field does not exist.
+ ///
+ Init *getValueInit(const std::string &FieldName) const;
+
/// getValueAsString - This method looks up the specified field and returns
/// its value as a string, throwing an exception if the field does not exist
/// or if the value is not a string.