[llvm] e8f8b89 - [NFC] Ignore unused vars in no-asserts builds
Jordan Rupprecht via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 8 09:04:11 PST 2022
Author: Jordan Rupprecht
Date: 2022-11-08T09:04:05-08:00
New Revision: e8f8b89efc295e3a9f6c2de3c1bc24cfce18669d
URL: https://github.com/llvm/llvm-project/commit/e8f8b89efc295e3a9f6c2de3c1bc24cfce18669d
DIFF: https://github.com/llvm/llvm-project/commit/e8f8b89efc295e3a9f6c2de3c1bc24cfce18669d.diff
LOG: [NFC] Ignore unused vars in no-asserts builds
Added:
Modified:
llvm/lib/IR/DebugInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 8c9ef9839eb1..74fab1f108a6 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -1762,6 +1762,7 @@ static CallInst *emitDbgAssign(AssignmentInfo Info, Value *Val, Value *Dest,
const VarRecord &VarRec, DIBuilder &DIB) {
auto *ID = StoreLikeInst.getMetadata(LLVMContext::MD_DIAssignID);
assert(ID && "Store instruction must have DIAssignID metadata");
+ (void)ID;
DIExpression *Expr = DIExpression::get(StoreLikeInst.getContext(), None);
if (!Info.StoreToWholeAlloca) {
@@ -1911,6 +1912,7 @@ void AssignmentTrackingPass::runOnFunction(Function &F) {
for (auto &P : DbgDeclares) {
const AllocaInst *Alloca = P.first;
auto Markers = at::getAssignmentMarkers(Alloca);
+ (void)Markers;
for (DbgDeclareInst *DDI : P.second) {
// Assert that the alloca that DDI uses is now linked to a dbg.assign
// describing the same variable (i.e. check that this dbg.declare
More information about the llvm-commits
mailing list