9#ifndef MLIR_DEBUG_BREAKPOINTMANAGERS_TAGBREAKPOINTMANAGER_H
10#define MLIR_DEBUG_BREAKPOINTMANAGERS_TAGBREAKPOINTMANAGER_H
15#include "llvm/ADT/MapVector.h"
41 auto it = breakpoints.find(action.
getTag());
42 if (it != breakpoints.end() && it->second->isEnabled())
43 return it->second.get();
51 auto result = breakpoints.try_emplace(tag);
54 it->second = std::make_unique<TagBreakpoint>(tag.str());
55 return it->second.get();
59 llvm::StringMap<std::unique_ptr<TagBreakpoint>> breakpoints;
An action is a specific action that is to be taken by the compiler, that can be toggled and controlle...
virtual StringRef getTag() const =0
Return a string "tag" which intends to uniquely identify this type of action.
This abstract class represents a breakpoint.
This is a manager to store a collection of breakpoints that trigger on tags.
TagBreakpoint * addBreakpoint(StringRef tag)
Add a breakpoint to the manager for the given tag and return it.
Breakpoint * match(const Action &action) const override
Try to match a Breakpoint to a given Action.
Simple breakpoint matching an action "tag".
void print(raw_ostream &os) const override
friend class TagBreakpointManager
Allow access to tag.
TagBreakpoint(StringRef tag)
Include the generated interface declarations.