[llvm] 232ab04 - [AsmPrinter] Fix an unused variable warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 11:24:56 PDT 2023
Author: Kazu Hirata
Date: 2023-09-11T11:24:50-07:00
New Revision: 232ab04812ab25ff16b6a60c92ceeb74dd9f5281
URL: https://github.com/llvm/llvm-project/commit/232ab04812ab25ff16b6a60c92ceeb74dd9f5281
DIFF: https://github.com/llvm/llvm-project/commit/232ab04812ab25ff16b6a60c92ceeb74dd9f5281.diff
LOG: [AsmPrinter] Fix an unused variable warning
This patch fixes:
llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp:109:10: error: unused
variable 'Ret' [-Werror,-Wunused-variable]
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
index 070fcf894f64f05..eab798c0da78438 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
@@ -108,6 +108,7 @@ void DwarfFile::addScopeVariable(LexicalScope *LS, DbgVariable *Var) {
if (unsigned ArgNum = DV->getArg()) {
auto Ret = ScopeVars.Args.insert({ArgNum, Var});
assert(Ret.second);
+ (void)Ret;
} else {
ScopeVars.Locals.push_back(Var);
}
More information about the llvm-commits
mailing list