[llvm] a29a97d - Fix a warning in D149117 [-Wunused-but-set-variable]

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 19:30:55 PDT 2023


Author: NAKAMURA Takumi
Date: 2023-05-06T11:30:04+09:00
New Revision: a29a97d76b22032eb9fcc4c54dac1f278b4f003a

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

LOG: Fix a warning in D149117 [-Wunused-but-set-variable]

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp b/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
index 7a64397e64c5..e65b9dad1380 100644
--- a/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+++ b/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
@@ -3004,7 +3004,8 @@ bool MemProfContextDisambiguation::applyImport(Module &M) {
           auto MIBIter = AllocNode.MIBs.begin();
           for (auto &MDOp : MemProfMD->operands()) {
             assert(MIBIter != AllocNode.MIBs.end());
-            auto StackIdIndexIter = MIBIter->StackIdIndices.begin();
+            LLVM_ATTRIBUTE_UNUSED auto StackIdIndexIter =
+                MIBIter->StackIdIndices.begin();
             auto *MIBMD = cast<const MDNode>(MDOp);
             MDNode *StackMDNode = getMIBStackNode(MIBMD);
             assert(StackMDNode);


        


More information about the llvm-commits mailing list