diff --git a/lib/vast/Frontend/Pipelines.cpp b/lib/vast/Frontend/Pipelines.cpp index 01d8d81c9c..1008fb5970 100644 --- a/lib/vast/Frontend/Pipelines.cpp +++ b/lib/vast/Frontend/Pipelines.cpp @@ -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)); }