Skip to content

Commit

Permalink
cc: -vast-snapshot-at accepts "*" to snapshot at every pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
lkorenc committed May 7, 2024
1 parent b5d428c commit 507038e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/vast/Frontend/Pipelines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ namespace vast::cc {
passes->print_on_error(llvm::errs());

if (auto snapshot_at = vargs.get_options_list(opt::snapshot_at)) {
auto instrument = std::make_unique< with_snapshots >(*snapshot_at, snapshot_prefix);
auto instrument = [&]() -> std::unique_ptr< with_snapshots > {
if (std::ranges::count(*snapshot_at, llvm::StringRef("*")))
return std::make_unique< snapshot_all >(snapshot_prefix);
return std::make_unique< snapshot_at_passes >(*snapshot_at, snapshot_prefix);
}();
passes->addInstrumentation(std::move(instrument));
}

Expand Down

0 comments on commit 507038e

Please sign in to comment.