clore::extract::ensure_cache_key
Owner: Module extract:compiler
Declaration: extract/compiler.cppm:60
Definition: extract/compiler.cppm:225
Declaration: Namespace clore::extract
Implementation
auto ensure_cache_key(CompileEntry& entry) -> void {
ensure_cache_key_impl(entry);
}The function clore::extract::ensure_cache_key serves as a thin entry point that delegates entirely to the implementation function ensure_cache_key_impl. Its purpose is to separate the public interface from the actual cache-key computation logic, allowing the implementation details—such as argument sanitization, compiler invocation parsing, file normalization, and hash generation—to evolve without affecting callers. The single call to ensure_cache_key_impl handles all internal control flow, including conditional checks for cached toolchain data, error handling for missing or invalid compilation databases, and the final assignment of the CompileEntry::cache_key field.
Side Effects
- modifies the cache key field of the
CompileEntry
Reads From
- the
CompileEntryobject (fields may be read to compute the cache key)
Writes To
- the
CompileEntryobject (specifically the cache key field)
Usage Patterns
- called by
query_toolchain_cachedbefore caching or querying toolchain for a compile entry
Calls
- function
clore::extract::ensure_cache_key_impl
Called By
- function
clore::extract::query_toolchain_cached