From 8b7be8f81ed1a917714579d83f905746db1eeef6 Mon Sep 17 00:00:00 2001 From: James Luo Date: Thu, 15 Jul 2021 12:30:04 -0700 Subject: [PATCH] fixup! [BOLT] Refactor the Pseudo Probe decoder Summary: add getter of (dummy) Root node of inline tree in decoded pseudo probe decoder --- llvm/include/llvm/MC/MCPseudoProbe.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/llvm/include/llvm/MC/MCPseudoProbe.h b/llvm/include/llvm/MC/MCPseudoProbe.h index 1874cee9e4da..b5e3c19ccc0a 100644 --- a/llvm/include/llvm/MC/MCPseudoProbe.h +++ b/llvm/include/llvm/MC/MCPseudoProbe.h @@ -234,6 +234,7 @@ class MCPseudoProbeInlineTreeBase { // Root node has a GUID 0. bool isRoot() const { return Guid == 0; } InlinedProbeTreeMap &getChildren() { return Children; } + const InlinedProbeTreeMap &getChildren() const { return Children; } std::vector &getProbes() { return Probes; } void addProbes(ProbeType Probe) { Probes.push_back(Probe); } // Caller node of the inline site @@ -407,8 +408,11 @@ class MCPseudoProbeDecoder { getInlinerDescForProbe(const MCDecodedPseudoProbe *Probe) const; std::string getSectionName() const { return SectionName; }; -}; + const MCDecodedPseudoProbeInlineTree &getDummyInlineRoot() const { + return DummyInlineRoot; + } +}; } // end namespace llvm #endif // LLVM_MC_MCPSEUDOPROBE_H