Make explicit the assumption that targetFileName is checked before ever calling printDep

This commit is contained in:
Rangi
2026-07-07 17:02:46 -04:00
parent ed8e3e4d02
commit d94d0bcc2f
+3
View File
@@ -8,6 +8,8 @@
#include <stdio.h>
#include <string>
#include "helpers.hpp" // assume
enum MissingInclude {
INC_ERROR, // A missing included file is an error that halts assembly
GEN_EXIT, // A missing included file is assumed to be generated; exit normally
@@ -36,6 +38,7 @@ struct Options {
void printDep(std::string const &depName) {
if (dependFile) {
assume(targetFileName.has_value());
fprintf(dependFile, "%s: %s\n", targetFileName->c_str(), depName.c_str());
}
}