Index: tools/gn/visibility.cc |
diff --git a/tools/gn/visibility.cc b/tools/gn/visibility.cc |
index c9dbb874897d5ab2f280c06842edb47b26f802e9..0dbad167cf0c6b38b607977176148b4b37df7da5 100644 |
--- a/tools/gn/visibility.cc |
+++ b/tools/gn/visibility.cc |
@@ -25,16 +25,10 @@ bool Visibility::Set(const SourceDir& current_dir, |
Err* err) { |
patterns_.clear(); |
- // Allow a single string to be passed in to make the common case (just one |
- // pattern) easier to specify. |
- if (value.type() == Value::STRING) { |
- patterns_.push_back(LabelPattern::GetPattern(current_dir, value, err)); |
- return !err->has_error(); |
- } |
- |
- // If it's not a string, it should be a list of strings. |
- if (!value.VerifyTypeIs(Value::LIST, err)) |
+ if (!value.VerifyTypeIs(Value::LIST, err)) { |
+ CHECK(err->has_error()); |
return false; |
+ } |
const std::vector<Value>& list = value.list_value(); |
for (size_t i = 0; i < list.size(); i++) { |