File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
lldb/source/Plugins/ExpressionParser/Swift Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -245,13 +245,15 @@ class LLDBExprNameLookup : public LLDBNameLookup {
245
245
unsigned count = counter++;
246
246
247
247
StringRef NameStr = Name.getIdentifier ().str ();
248
+ if (NameStr.empty ())
249
+ return false ;
248
250
251
+ ConstString name_const_str (NameStr);
249
252
if (m_log) {
250
253
m_log->Printf (" [LLDBExprNameLookup::lookupAdditions (%u)] Searching for %s" ,
251
- count, Name. getIdentifier (). str (). str (). c_str ( ));
254
+ count, name_const_str. AsCString ( " <anonymous> " ));
252
255
}
253
256
254
- ConstString name_const_str (NameStr);
255
257
std::vector<swift::ValueDecl *> results;
256
258
257
259
for (auto *alias : m_type_aliases) {
@@ -396,11 +398,13 @@ class LLDBREPLNameLookup : public LLDBNameLookup {
396
398
unsigned count = counter++;
397
399
398
400
StringRef NameStr = Name.getIdentifier ().str ();
399
- ConstString name_const_str (NameStr);
401
+ if (NameStr.empty ())
402
+ return false ;
400
403
404
+ ConstString name_const_str (NameStr);
401
405
if (m_log) {
402
406
m_log->Printf (" [LLDBREPLNameLookup::lookupAdditions (%u)] Searching for %s" ,
403
- count, Name. getIdentifier (). str (). str (). c_str ( ));
407
+ count, name_const_str. AsCString ( " <anonymous> " ));
404
408
}
405
409
406
410
// Find decls that come from the current compilation.
You can’t perform that action at this time.
0 commit comments