Skip to content

Commit

Permalink
[llvm-objdump/mac] Silence XAR deprecation warning (NFC)
Browse files Browse the repository at this point in the history
If you're building this on macOS 12.x+ this produces a deprecation
warning. I'm not sure what this means for the bitcode format going
forward, but it seems safe to silence for now.

Differential Revision: https://reviews.llvm.org/D118569
  • Loading branch information
keith committed Feb 10, 2022
1 parent 29bd3fa commit 19ea625
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions llvm/tools/llvm-objdump/MachODump.cpp
Expand Up @@ -188,8 +188,12 @@ typedef DiceTable::iterator dice_table_iterator;
namespace {
struct ScopedXarFile {
xar_t xar;
ScopedXarFile(const char *filename, int32_t flags)
: xar(xar_open(filename, flags)) {}
ScopedXarFile(const char *filename, int32_t flags) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
xar = xar_open(filename, flags);
#pragma clang diagnostic pop
}
~ScopedXarFile() {
if (xar)
xar_close(xar);
Expand Down

0 comments on commit 19ea625

Please sign in to comment.