[llvm-branch-commits] [llvm] [Instrumentor] Add a global function regexp to limit the instrumentation (PR #196234)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu May 7 01:56:55 PDT 2026
================
@@ -274,6 +281,17 @@ bool InstrumentorImpl::instrument() {
if (!shouldInstrumentTarget())
return Changed;
+ const auto FunctionRegexStr = IConf.FunctionRegex->getString();
+ if (!FunctionRegexStr.empty()) {
+ ParsedFunctionRegex = Regex(FunctionRegexStr);
+ std::string ErrMsg;
+ if (!ParsedFunctionRegex.isValid(ErrMsg)) {
+ IIRB.Ctx.diagnose(DiagnosticInfoInstrumentation(
----------------
arsenm wrote:
missing error test
https://github.com/llvm/llvm-project/pull/196234
More information about the llvm-branch-commits
mailing list