hash_string(input_file);
}
+ /* we have to hash the extension, as a .i file isn't treated the same
+ by the compiler as a .ii file */
+ hash_string(i_extension);
+
/* first the arguments */
for (i=1;i<args->argc;i++) {
/* some arguments don't contribute to the hash. The
status = execute(args->argv, path_stdout, path_stderr);
args_pop(args, 2);
} else {
- /* we are compiling a .i or .ii file - that means we can skip the cpp stage
- and directly form the correct i_tmpfile */
+ /* we are compiling a .i or .ii file - that means we
+ can skip the cpp stage and directly form the
+ correct i_tmpfile */
path_stdout = input_file;
if (create_empty_file(path_stderr) != 0) {
stats_update(STATS_ERROR);
$CCACHE_COMPILE -c test1.i
checkstat 'cache hit' 10
checkstat 'cache miss' 38
-
+ testname="direct .ii file"
+ mv test1.i test1.ii
+ $CCACHE_COMPILE -c test1.ii
+ checkstat 'cache hit' 10
+ checkstat 'cache miss' 39
+
+ $CCACHE_COMPILE -c test1.ii
+ checkstat 'cache hit' 11
+ checkstat 'cache miss' 39
+
testname="zero-stats"
$CCACHE -z > /dev/null
checkstat 'cache hit' 0