Skip to content

Commit d97b2b3

Browse files
committed
[DebugInfo] Fix -Wunused-variable in DebugProgramInstruction.cpp (NFC)
/llvm-project/llvm/lib/IR/DebugProgramInstruction.cpp:163:18: error: unused variable 'Unit' [-Werror,-Wunused-variable] DICompileUnit *Unit = ^ 1 error generated.
1 parent 3594769 commit d97b2b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/IR/DebugProgramInstruction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ DPValue *DPValue::clone() const { return new DPValue(*this); }
160160

161161
DbgVariableIntrinsic *
162162
DPValue::createDebugIntrinsic(Module *M, Instruction *InsertBefore) const {
163-
DICompileUnit *Unit =
163+
[[maybe_unused]] DICompileUnit *Unit =
164164
getDebugLoc().get()->getScope()->getSubprogram()->getUnit();
165165
assert(M && Unit &&
166166
"Cannot clone from BasicBlock that is not part of a Module or "

0 commit comments

Comments
 (0)