[llvm] [llvm-reduce] Remove DIGlobalVariableExpressions from DICompileUnit's globals (PR #94497)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 09:37:39 PDT 2024
================
@@ -65,12 +65,14 @@ void identifyUninterestingMDNodes(Oracle &O, MDNodeList &MDs) {
SmallVector<Metadata *, 16> TN;
for (size_t I = 0; I < Tup->getNumOperands(); ++I) {
// Ignore any operands that are not DebugInfo metadata nodes.
- if (isa_and_nonnull<DINode>(Tup->getOperand(I)))
- // Don't add uninteresting operands to the tuple.
- if (!O.shouldKeep())
- continue;
-
- TN.push_back(Tup->getOperand(I));
+ if (Metadata *Op = Tup->getOperand(I).get()) {
+ if (isa<DINode>(Op) || isa<DIGlobalVariableExpression>(Op)) {
----------------
OCHyams wrote:
I've guarded it with `if (Metadata *Op = Tup->getOperand(I).get())` above this line
https://github.com/llvm/llvm-project/pull/94497
More information about the llvm-commits
mailing list