[llvm] [Pass] Support start/stop in instrumentation (PR #70912)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 22 00:10:24 PST 2023
================
@@ -148,6 +165,17 @@ class PassInstrumentationCallbacks {
AnalysesClearedCallbacks.emplace_back(std::move(C));
}
+ void registerStartStopInfo(CodeGenStartStopInfo &&C) {
+ StartStopInfo = std::move(C);
+ }
+
+ bool isStartStopInfoRegistered() const { return StartStopInfo.has_value(); }
+
+ CodeGenStartStopInfo &getStartStopInfo() {
+ assert(StartStopInfo.has_value() && "StartStopInfo is unregistered!");
----------------
arsenm wrote:
don't need .has_value()
https://github.com/llvm/llvm-project/pull/70912
More information about the llvm-commits
mailing list