Skip to content

Commit

Permalink
[DebugInfo] Fix a warning
Browse files Browse the repository at this point in the history
This patch fixes:

  llvm/lib/DebugInfo/GSYM/GsymCreator.cpp:117:18: error: unused
  variable 'MaxAddressOffset' [-Werror,-Wunused-variable]
  • Loading branch information
kazutakahirata committed Mar 7, 2023
1 parent 5c3c176 commit 0fa1ee8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
Expand Up @@ -124,6 +124,7 @@ llvm::Error GsymCreator::encode(FileWriter &O) const {
// introduced when the code changes that can cause problems here so it is
// good to catch this during testing.
assert(AddrOffset <= MaxAddressOffset);
(void)MaxAddressOffset;
switch (Hdr.AddrOffSize) {
case 1:
O.writeU8(static_cast<uint8_t>(AddrOffset));
Expand Down

0 comments on commit 0fa1ee8

Please sign in to comment.