[PATCH] D136444: [llvm-debuginfo-analyzer] (05/09) - Select elements - Test case (UndefinedBehaviorSanitizer)
Carlos Alberto Enciso via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 21 11:18:40 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGde1e911f02a0: [llvm-debuginfo-analyzer] (05/09) - Select elements (authored by CarlosAlbertoEnciso).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136444/new/
https://reviews.llvm.org/D136444
Files:
llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h
llvm/lib/DebugInfo/LogicalView/Core/LVOptions.cpp
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) {
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 {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136444.469699.patch
Type: text/x-patch
Size: 1338 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221021/db7c1ede/attachment.bin>
More information about the llvm-commits
mailing list