[llvm] [PassInstrumentation] Make getPassNameForClassName return optional (PR #150029)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 22 08:07:49 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>
----------------
nikic wrote:
Just going by the usages, I think it would make things a bit simpler. But no strong opinion, I'm okay with the std::optional as well.
https://github.com/llvm/llvm-project/pull/150029
More information about the llvm-commits
mailing list