[PATCH] D137933: [llvm-debuginfo-analyzer] 08a - Memory Management

Carlos Alberto Enciso via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 16 01:31:08 PST 2023


CarlosAlbertoEnciso added inline comments.


================
Comment at: llvm/lib/DebugInfo/LogicalView/Core/LVType.cpp:261
+      else
+        TypesParam->push_back(Type);
+    }
----------------
Orlando wrote:
> Before your recent change this branch was taken if `options().getAttributeArgument()` is false, but now this branch is taken if `options().getAttributeArgument()` is true (and both `Type->getIsKindType()`  and `Type->getIsKindScope())` are false). Just checking - is the new behaviour correct?
> 
> And if so, what was the result of the previous incorrect behaviour? 
Very good catch. The behaviour has not being changed.

Incorrec placement for the closing `}`. The code should be:

```
    if (options().getAttributeArgument()) {
      if (Type->getIsKindType())
        TypesParam->push_back(Type->getTypeAsType());
      else if (Type->getIsKindScope())
        ScopesParam->push_back(Type->getTypeAsScope());
    } else
      TypesParam->push_back(Type);
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137933/new/

https://reviews.llvm.org/D137933



More information about the llvm-commits mailing list