std::filesystem::path orig_input_file;
// The source file path, potentially rewritten into relative.
- std::string input_file;
+ std::filesystem::path input_file;
// Prefix to the input file when adding it to a command line.
std::string input_file_prefix;
args_info.orig_input_file = state.input_files.front();
// Rewrite to relative to increase hit rate.
args_info.input_file =
- util::pstr(core::make_relative_path(ctx, args_info.orig_input_file));
+ core::make_relative_path(ctx, args_info.orig_input_file);
// Bail out on too hard combinations of options.
if (state.found_mf_opt && state.found_wp_md_or_mmd_opt) {
LOG_RAW("No -c option found");
// Having a separate statistic for autoconf tests is useful, as they are
// the dominant form of "called for link" in many cases.
- return tl::unexpected(args_info.input_file.find("conftest.")
- != std::string::npos
- ? Statistic::autoconf_test
- : Statistic::called_for_link);
+ return tl::unexpected(
+ util::pstr(args_info.input_file).str().find("conftest.")
+ != std::string::npos
+ ? Statistic::autoconf_test
+ : Statistic::called_for_link);
}
}
if (ctx.args_info.direct_i_file) {
// We are compiling a .i or .ii file - that means we can skip the cpp stage
// and directly form the correct i_tmpfile.
- preprocessed_path = ctx.args_info.input_file;
+ preprocessed_path = util::pstr(ctx.args_info.input_file);
} else {
// Run cpp on the input file to obtain the .i.