[llvm] [llvm-reduce] Remove DIGlobalVariableExpressions from DICompileUnit's globals (PR #94497)

Matthew Voss via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 11:30:58 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)) {
----------------
ormris wrote:

Ah yes. That's fine, then. One nit: The braces on this if statement are not necessary.

https://github.com/llvm/llvm-project/pull/94497


More information about the llvm-commits mailing list