[PATCH] D115175: Remove Colours array in -print-changed=dot-cfg

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 7 11:15:31 PST 2021


jamieschmeiser added inline comments.


================
Comment at: llvm/lib/Passes/StandardInstrumentations.cpp:1272
   // Is this in before, after, or both?
-  IRChangeDiffType getType() const { return Type; }
+  StringRef getColour() const { return Colour; }
 
----------------
aeubanks wrote:
> should this be a `std::string`? it looks like it's referencing a `std::string` in `DisplayEdge::DisplayEdge()` that goes out of scope
I don't think so.  This is referring to the member of this class and this class is a base of DisplayEdge.  The Colour value is sent in during base construction and is a StringRef.  All of the colour values that are stored and passed around are StringRefs and ultimately all refer back to the strings in the 3 options for specifying the colours so they should all have values and be in scope.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115175



More information about the llvm-commits mailing list