mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-15 03:26:05 +00:00
[TableGen] Use 'isa' to identify UnsetInits rather than comparing with the singleton object created by UnsetInit::get(). Makes it more consistent with the other types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235465 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -517,7 +517,7 @@ std::string BitsInit::getAsString() const {
|
||||
// bits initializer will resolve into VarBitInit to keep the field name and bit
|
||||
// number used in targets with fixed insn length.
|
||||
static Init *fixBitInit(const RecordVal *RV, Init *Before, Init *After) {
|
||||
if (RV || After != UnsetInit::get())
|
||||
if (RV || !isa<UnsetInit>(After))
|
||||
return After;
|
||||
return Before;
|
||||
}
|
||||
@@ -1961,7 +1961,7 @@ bool Record::getValueAsBitOrUnset(StringRef FieldName, bool &Unset) const {
|
||||
PrintFatalError(getLoc(), "Record `" + getName() +
|
||||
"' does not have a field named `" + FieldName.str() + "'!\n");
|
||||
|
||||
if (R->getValue() == UnsetInit::get()) {
|
||||
if (isa<UnsetInit>(R->getValue())) {
|
||||
Unset = true;
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user