[llvm] r239245 - [TableGen] Use 'isa' to check if something is an UnsetInit rather than getting the UnsetInit singleton and comparing pointers. NFC.
Craig Topper
craig.topper at gmail.com
Sat Jun 6 23:01:13 PDT 2015
Author: ctopper
Date: Sun Jun 7 01:01:13 2015
New Revision: 239245
URL: http://llvm.org/viewvc/llvm-project?rev=239245&view=rev
Log:
[TableGen] Use 'isa' to check if something is an UnsetInit rather than getting the UnsetInit singleton and comparing pointers. NFC.
Modified:
llvm/trunk/include/llvm/TableGen/Record.h
Modified: llvm/trunk/include/llvm/TableGen/Record.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/TableGen/Record.h?rev=239245&r1=239244&r2=239245&view=diff
==============================================================================
--- llvm/trunk/include/llvm/TableGen/Record.h (original)
+++ llvm/trunk/include/llvm/TableGen/Record.h Sun Jun 7 01:01:13 2015
@@ -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
More information about the llvm-commits
mailing list