[llvm] [BOLT] Fix unused variable warning (PR #93323)
Sayhaan Siddiqui via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 09:57:10 PDT 2024
https://github.com/sayhaan created https://github.com/llvm/llvm-project/pull/93323
This fixes
```
/data/sandcastle/boxes/trunk-grepo-llvm-c2-grepo/llvm-project/bolt/lib/Rewrite/DWARFRewriter.cpp:76:45: warning: variable 'AbbrDecl' set but not used [-Wunused-but-set-variable]
76 | if (const DWARFAbbreviationDeclaration *AbbrDecl =
```
>From b538842751f4b9d7b5f62075e42cd4ae9bdb6352 Mon Sep 17 00:00:00 2001
From: Sayhaan Siddiqui <sayhaan at meta.com>
Date: Fri, 24 May 2024 09:38:01 -0700
Subject: [PATCH] [BOLT] Fix unused variable warning
---
bolt/lib/Rewrite/DWARFRewriter.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/bolt/lib/Rewrite/DWARFRewriter.cpp b/bolt/lib/Rewrite/DWARFRewriter.cpp
index d582ce7b33a27..ab46503621e9a 100644
--- a/bolt/lib/Rewrite/DWARFRewriter.cpp
+++ b/bolt/lib/Rewrite/DWARFRewriter.cpp
@@ -73,8 +73,7 @@ static void printDie(DWARFUnit &DU, uint64_t DIEOffset) {
DWARFDataExtractor DebugInfoData = DU.getDebugInfoExtractor();
DWARFDebugInfoEntry DIEEntry;
if (DIEEntry.extractFast(DU, &DIEOffset, DebugInfoData, NextCUOffset, 0)) {
- if (const DWARFAbbreviationDeclaration *AbbrDecl =
- DIEEntry.getAbbreviationDeclarationPtr()) {
+ if (DIEEntry.getAbbreviationDeclarationPtr()) {
DWARFDie DDie(&DU, &DIEEntry);
printDie(DDie);
} else {
More information about the llvm-commits
mailing list