[llvm] [PassInstrumentation] Make getPassNameForClassName return optional (PR #150029)
Danila Malyutin via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 22 07:32:52 PDT 2025
================
@@ -165,7 +165,8 @@ class PassInstrumentationCallbacks {
/// Add a class name to pass name mapping for use by pass instrumentation.
LLVM_ABI void addClassToPassName(StringRef ClassName, StringRef PassName);
/// Get the pass name for a given pass class name.
- LLVM_ABI StringRef getPassNameForClassName(StringRef ClassName);
+ LLVM_ABI std::optional<StringRef>
----------------
danilaml wrote:
We can (with the assert we try to enforce that no one tries to "register" an empty pass name). Do we want to?
https://github.com/llvm/llvm-project/pull/150029
More information about the llvm-commits
mailing list