[llvm] 5e245ab - [IR][NFC] Fix warnings for variables that are only used in assertions
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 9 09:48:06 PST 2023
Author: Min-Yih Hsu
Date: 2023-11-09T09:46:17-08:00
New Revision: 5e245ab3788fc2445a43bf470ea05f8eb676998b
URL: https://github.com/llvm/llvm-project/commit/5e245ab3788fc2445a43bf470ea05f8eb676998b
DIFF: https://github.com/llvm/llvm-project/commit/5e245ab3788fc2445a43bf470ea05f8eb676998b.diff
LOG: [IR][NFC] Fix warnings for variables that are only used in assertions
NFC.
Added:
Modified:
llvm/lib/IR/Instruction.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/Instruction.cpp b/llvm/lib/IR/Instruction.cpp
index b6bb00edae4ac9f..27b2c5ee4d399dc 100644
--- a/llvm/lib/IR/Instruction.cpp
+++ b/llvm/lib/IR/Instruction.cpp
@@ -244,6 +244,8 @@ iterator_range<DPValue::self_iterator>
Instruction::getDbgValueRange() const {
BasicBlock *Parent = const_cast<BasicBlock *>(getParent());
assert(Parent && "Instruction must be inserted to have DPValues");
+ (void)Parent;
+
if (!DbgMarker)
return DPMarker::getEmptyDPValueRange();
More information about the llvm-commits
mailing list