[TableGen] Use 'isa' to check if something is an UnsetInit rather than getting the...
authorCraig Topper <craig.topper@gmail.com>
Sun, 7 Jun 2015 06:01:13 +0000 (06:01 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 7 Jun 2015 06:01:13 +0000 (06:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239245 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/TableGen/Record.h

index 770eb3b..9e06b86 100644 (file)
@@ -1351,7 +1351,7 @@ public:
 
   /// Return true if the named field is unset.
   bool isValueUnset(StringRef FieldName) const {
-    return getValueInit(FieldName) == UnsetInit::get();
+    return isa<UnsetInit>(getValueInit(FieldName));
   }
 
   /// getValueAsString - This method looks up the specified field and returns