std::filesystem::path output_dia;
// Split dwarf information (GCC 4.8 and up). Contains pathname if not empty.
- std::string output_dwo;
+ std::filesystem::path output_dwo;
// The path to the ipa clones (implicit when using -fdump-ipa-clones).
std::string output_ipa;
// we haven't seen the -gsplit-dwarf option.
args_info.seen_split_dwarf = false;
} else {
- args_info.output_dwo =
- util::pstr(util::with_extension(args_info.output_obj, ".dwo"));
+ args_info.output_dwo = util::with_extension(args_info.output_obj, ".dwo");
}
}
// produced one, intentionally not using x_unlink or tmp_unlink since we're
// not interested in logging successful deletions or failures due to
// nonexistent .dwo files.
- if (unlink(ctx.args_info.output_dwo.c_str()) != 0 && errno != ENOENT
- && errno != ESTALE) {
+ if (unlink(util::pstr(ctx.args_info.output_dwo).c_str()) != 0
+ && errno != ENOENT && errno != ESTALE) {
LOG("Failed to unlink {}: {}", ctx.args_info.output_dwo, strerror(errno));
return tl::unexpected(Statistic::bad_output_file);
}