// Update a hash sum with information specific to the direct and preprocessor
// modes and calculate the result name. Returns the result name on success,
-// otherwise NULL. Caller frees.
+// otherwise NULL.
static optional<Digest>
calculate_result_name(Context& ctx,
const Args& args,
return true;
}
-// Try to get the result name from a manifest file. Caller frees. Returns NULL
-// on failure.
+// Try to get the result name from a manifest file. Returns nullopt on failure.
optional<Digest>
manifest_get(const Context& ctx, const std::string& path)
{
#define FLAG_ALWAYS 2 // always show, even if zero
#define FLAG_NEVER 4 // never show
-// Returns a formatted version of a statistics value, or NULL if the statistics
-// line shouldn't be printed. Caller frees.
+// Returns a formatted version of a statistics value, or the empty string if the
+// statistics line shouldn't be printed.
using format_fn = std::string (*)(uint64_t value);
static std::string format_size_times_1024(uint64_t size);