ART: Fix expectations for instruction-set-features string
Only check for an empty features vector if we found "default." The
vector can be empty if this is already handled, e.g., for "smp."
Change-Id: I0d07faf38d0b50f151b5d29e6993d8224034254e
diff --git a/runtime/arch/instruction_set_features.cc b/runtime/arch/instruction_set_features.cc
index 1fd1dea..db4b0b1 100644
--- a/runtime/arch/instruction_set_features.cc
+++ b/runtime/arch/instruction_set_features.cc
@@ -250,7 +250,11 @@
}
first = true;
}
- DCHECK_EQ(use_default, features.empty());
+ // Expectation: "default" is standalone, no other flags. But an empty features vector after
+ // processing can also come along if the handled flags (at the moment only smp) are the only
+ // ones in the list. So logically, we check "default -> features.empty."
+ DCHECK(!use_default || features.empty());
+
return AddFeaturesFromSplitString(smp, features, error_msg);
}