[PATCH] D118569: [llvm-objdump/mac] Silence XAR deprecation warning (NFC)
    Keith Smiley via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Feb  9 20:25:00 PST 2022
    
    
  
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG19ea62591095: [llvm-objdump/mac] Silence XAR deprecation warning (NFC) (authored by keith).
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118569/new/
https://reviews.llvm.org/D118569
Files:
  llvm/tools/llvm-objdump/MachODump.cpp
Index: llvm/tools/llvm-objdump/MachODump.cpp
===================================================================
--- llvm/tools/llvm-objdump/MachODump.cpp
+++ llvm/tools/llvm-objdump/MachODump.cpp
@@ -188,8 +188,12 @@
 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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118569.407379.patch
Type: text/x-patch
Size: 647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220210/6bd540d6/attachment.bin>
    
    
More information about the llvm-commits
mailing list