summaryrefslogtreecommitdiff
path: root/include/llvm/TableGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-03-15 22:51:13 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-03-15 22:51:13 +0000
commit64110ffc9eecbe999c29ac9d9f6697447a110036 (patch)
treeeb9508b024f2155f69ce92062ce9d399972e189d /include/llvm/TableGen
parentdfe91cefd25614bc9ac1626d67df4d5ad5d3553f (diff)
downloadllvm-64110ffc9eecbe999c29ac9d9f6697447a110036.tar.gz
llvm-64110ffc9eecbe999c29ac9d9f6697447a110036.tar.bz2
llvm-64110ffc9eecbe999c29ac9d9f6697447a110036.tar.xz
Add SchedRW as an Instruction field.
Don't require instructions to inherit Sched<...>. Sometimes it is more convenient to say: let SchedRW = ... in { ... } Which is now possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/TableGen')
-rw-r--r--include/llvm/TableGen/Record.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h
index 3cf4f1f054..76ee69dd8d 100644
--- a/include/llvm/TableGen/Record.h
+++ b/include/llvm/TableGen/Record.h
@@ -1559,6 +1559,11 @@ public:
///
Init *getValueInit(StringRef FieldName) const;
+ /// Return true if the named field is unset.
+ bool isValueUnset(StringRef FieldName) const {
+ return getValueInit(FieldName) == UnsetInit::get();
+ }
+
/// 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.