[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 770eb3b8e2ecea7e2aed43a2154d0cfb01519d0f..9e06b86b15f7abe5d89379693f1f89aa1c2f9141 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