From a7d38fc6702d2a763e8187b4773d02b63b3229ac Mon Sep 17 00:00:00 2001 From: Goran Jakovljevic Date: Thu, 12 Mar 2015 15:32:55 +0100 Subject: 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 --- runtime/arch/instruction_set_features.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'runtime/arch/instruction_set_features.cc') diff --git a/runtime/arch/instruction_set_features.cc b/runtime/arch/instruction_set_features.cc index 1fd1deadef..db4b0b14ce 100644 --- a/runtime/arch/instruction_set_features.cc +++ b/runtime/arch/instruction_set_features.cc @@ -250,7 +250,11 @@ const InstructionSetFeatures* InstructionSetFeatures::AddFeaturesFromString( } 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); } -- cgit v1.2.3-59-g8ed1b