Lines Matching defs:key

124           "assign operation takes one or more key=value arguments");
134 "assign operation takes one or more key=value arguments");
138 llvm::StringRef key, value;
139 std::tie(key, value) = entry.ref().split('=');
141 if (key.empty()) {
142 error = Status::FromErrorString("empty dictionary key");
146 if (key.front() == '[') {
147 // Key name starts with '[', so the key value must be in single or
148 // double quotes like: ['<key>'] ["<key>"]
149 if ((key.size() > 2) && (key.back() == ']')) {
151 key = key.substr(1, key.size() - 2);
152 const char quote_char = key.front();
154 if ((key.size() > 2) && (key.back() == quote_char)) {
156 key = key.substr(1, key.size() - 2);
170 "invalid key \"%s\", the key must be a bare string or "
171 "surrounded by brackets with optional quotes: [<key>] or "
172 "['<key>'] or [\"<key>\"]",
173 key.str().c_str());
184 SetValueForKey(key, enum_value, true);
192 SetValueForKey(key, value_sp, true);
205 llvm::StringRef key(args.GetArgumentAtIndex(i));
206 if (!DeleteValueForKey(key)) {
209 key.data());
215 "remove operation takes one or more key arguments");
249 "support '[<key>]' subvalues where <key> "
257 llvm::StringRef key, quote_char;
265 std::tie(key, sub_name) = temp.split(']');
267 if (!key.consume_back(quote_char) || key.empty()) {
270 "key names must be formatted as ['<key>'] where <key> "
277 value_sp = GetValueForKey(key);
280 "dictionary does not contain a value for the key name '%s'",
281 key.str().c_str());
307 OptionValueDictionary::GetValueForKey(llvm::StringRef key) const {
309 auto pos = m_values.find(key);
315 bool OptionValueDictionary::SetValueForKey(llvm::StringRef key,
322 auto pos = m_values.find(key);
326 m_values[key] = value_sp;
332 bool OptionValueDictionary::DeleteValueForKey(llvm::StringRef key) {
333 auto pos = m_values.find(key);