]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Reuse previous depend mode hash result to avoid some extra work
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 11 Apr 2019 20:12:13 +0000 (22:12 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 11 Apr 2019 20:16:21 +0000 (22:16 +0200)
src/ccache.c

index f845c4f67840f8a958760f24fd006776dd4edd8e..43d1ab3df4f65bc829029262b80af90c56d76da6 100644 (file)
@@ -742,7 +742,7 @@ remember_include_file(char *path, struct hash *cpp_hash, bool system,
 
                if (depend_mode_hash) {
                        hash_delimiter(depend_mode_hash, "include");
-                       char *result = hash_result(fhash);
+                       char *result = format_hash_as_string(h->hash, h->size);
                        hash_string(depend_mode_hash, result);
                        free(result);
                }