From 9c88480a881067658d55fdc4d6e7ab8f20b0f9fb Mon Sep 17 00:00:00 2001 From: Francesco Biscani Date: Sat, 19 Aug 2023 22:21:03 +0200 Subject: [PATCH] clang-tidy fix. --- src/llvm_state_mem_cache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llvm_state_mem_cache.cpp b/src/llvm_state_mem_cache.cpp index 359770a19..abe2c1b0d 100644 --- a/src/llvm_state_mem_cache.cpp +++ b/src/llvm_state_mem_cache.cpp @@ -136,7 +136,7 @@ void llvm_state_mem_cache_sanity_checks() std::optional llvm_state_mem_cache_lookup(const std::string &bc, unsigned opt_level) { // Lock down. - std::lock_guard lock(mem_cache_mutex); + const std::lock_guard lock(mem_cache_mutex); // Sanity checks. llvm_state_mem_cache_sanity_checks(); @@ -160,7 +160,7 @@ std::optional llvm_state_mem_cache_lookup(const std::string &bc, void llvm_state_mem_cache_try_insert(std::string bc, unsigned opt_level, llvm_mc_value val) { // Lock down. - std::lock_guard lock(mem_cache_mutex); + const std::lock_guard lock(mem_cache_mutex); // Sanity checks. llvm_state_mem_cache_sanity_checks();