[llvm] [StandardInstrumentations]Add support for numeric label (PR #148844)

Jamie Schmeiser via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 5 13:13:33 PDT 2025


================
@@ -1950,10 +1958,9 @@ std::string DotCfgDiffNode::getBodyContent() const {
   // Drop leading newline, if present.
   if (BS.front() == '\n')
     BS1 = BS1.drop_front(1);
-  // Get label.
-  StringRef Label = BS1.take_until([](char C) { return C == ':'; });
   // drop predecessors as they can be big and are redundant
-  BS1 = BS1.drop_until([](char C) { return C == '\n'; }).drop_front();
+  if (BS1.str().find(Label) != std::string::npos)
----------------
jamieschmeiser wrote:

Yes, remove the comment while keeping the label.  Perhaps removing a comment of the form `; preds = ...\n` within the first couple of lines would work but be careful about scanning too far looking for it as that could be expensive.  That said, this is probably a debug run anyway and efficiency is probably not the top priority here as this output is already expensive...

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


More information about the llvm-commits mailing list