Index: llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h =================================================================== --- llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h +++ llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h @@ -511,8 +511,8 @@ void resolveGenericPatternMatch(T *Element, const U &Requests) { assert(Element && "Element must not be nullptr"); auto CheckPattern = [=]() -> bool { - return Element->isNamed() && - (matchGenericPattern(Element->getName()) || + return (Element->isNamed() && matchGenericPattern(Element->getName())) || + (Element->isTyped() && matchGenericPattern(Element->getTypeName())); }; auto CheckOffset = [=]() -> bool { Index: llvm/lib/DebugInfo/LogicalView/Core/LVOptions.cpp =================================================================== --- llvm/lib/DebugInfo/LogicalView/Core/LVOptions.cpp +++ llvm/lib/DebugInfo/LogicalView/Core/LVOptions.cpp @@ -505,6 +505,9 @@ // Match a general pattern. bool LVPatterns::matchPattern(StringRef Input, const LVMatchInfo &MatchInfo) { bool Matched = false; + // Do not match an empty 'Input'. + if (Input.empty()) + return Matched; // Traverse all match specifications. for (const LVMatch &Match : MatchInfo) { switch (Match.Mode) {