[Mlir-commits] [mlir] 2abd71e - [mlir] Fix -Wunused-variable in DebugImporter.cpp (NFC)

Jie Fu llvmlistbot at llvm.org
Mon Apr 8 03:23:04 PDT 2024


Author: Jie Fu
Date: 2024-04-08T18:22:06+08:00
New Revision: 2abd71ec51079d84a29639389dc9a66edd4909e5

URL: https://github.com/llvm/llvm-project/commit/2abd71ec51079d84a29639389dc9a66edd4909e5
DIFF: https://github.com/llvm/llvm-project/commit/2abd71ec51079d84a29639389dc9a66edd4909e5.diff

LOG: [mlir] Fix -Wunused-variable in DebugImporter.cpp (NFC)

llvm-project/mlir/lib/Target/LLVMIR/DebugImporter.cpp:377:10:
error: unused variable '[_, inserted]' [-Werror,-Wunused-variable]
    auto [_, inserted] = dependentCache.try_emplace(
         ^
1 error generated.

Added: 
    

Modified: 
    mlir/lib/Target/LLVMIR/DebugImporter.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Target/LLVMIR/DebugImporter.cpp b/mlir/lib/Target/LLVMIR/DebugImporter.cpp
index 3dc2d4e3a7509f..aa8c307ba2cee7 100644
--- a/mlir/lib/Target/LLVMIR/DebugImporter.cpp
+++ b/mlir/lib/Target/LLVMIR/DebugImporter.cpp
@@ -374,7 +374,7 @@ DebugImporter::RecursionPruner::finalizeTranslation(llvm::DINode *node,
 
   // Insert the result into our internal cache if it's not self-contained.
   if (!state.unboundSelfRefs.empty()) {
-    auto [_, inserted] = dependentCache.try_emplace(
+    [[maybe_unused]] auto [_, inserted] = dependentCache.try_emplace(
         node, DependentTranslation{result, state.unboundSelfRefs});
     assert(inserted && "invalid state: caching the same DINode twice");
     return {result, false};


        


More information about the Mlir-commits mailing list