[PATCH] D125733: [BOLT][NFC] Suppress unused variable warnings
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 16 16:26:02 PDT 2022
Amir created this revision.
Herald added a reviewer: rafauler.
Herald added a subscriber: ayermolo.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.
Addresses the warnings found by Apple Clang 13.1.6 (Xcode 13.3.1).
Tip @tschuett issue #55404.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D125733
Files:
bolt/lib/Core/BinaryBasicBlock.cpp
bolt/lib/Core/BinaryContext.cpp
bolt/lib/Rewrite/RewriteInstance.cpp
Index: bolt/lib/Rewrite/RewriteInstance.cpp
===================================================================
--- bolt/lib/Rewrite/RewriteInstance.cpp
+++ bolt/lib/Rewrite/RewriteInstance.cpp
@@ -4048,6 +4048,7 @@
if (BSec->getAllocAddress()) {
assert(!DataWritten && "Writing section twice.");
+ (void)DataWritten;
SectionData = BSec->getOutputData();
LLVM_DEBUG(dbgs() << "BOLT-DEBUG: " << (Size ? "appending" : "writing")
Index: bolt/lib/Core/BinaryContext.cpp
===================================================================
--- bolt/lib/Core/BinaryContext.cpp
+++ bolt/lib/Core/BinaryContext.cpp
@@ -809,6 +809,7 @@
break;
}
assert(Found && "Label not found");
+ (void)Found;
MCSymbol *NewLabel = Ctx->createNamedTempSymbol("duplicatedJT");
JumpTable *NewJT =
new JumpTable(*NewLabel, JT->getAddress(), JT->EntrySize, JT->Type,
@@ -1172,6 +1173,7 @@
}
}
assert(Valid);
+ (void)Valid;
generateSymbolHashes();
}
Index: bolt/lib/Core/BinaryBasicBlock.cpp
===================================================================
--- bolt/lib/Core/BinaryBasicBlock.cpp
+++ bolt/lib/Core/BinaryBasicBlock.cpp
@@ -328,6 +328,7 @@
}
}
assert(Erased && "Pred is not a predecessor of this block!");
+ (void)Erased;
}
void BinaryBasicBlock::removeDuplicateConditionalSuccessor(MCInst *CondBranch) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125733.429891.patch
Type: text/x-patch
Size: 1397 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220516/7edc5171/attachment-0001.bin>
More information about the llvm-commits
mailing list