https://github.com/JDevlieghere created https://github.com/llvm/llvm-project/pull/112262
CFPropertyListCreateXMLData has been deprecated since macOS 10.10. Use CFPropertyListCreateData instead. >From 9048d3a65e9478d5b25338bef656f69c2fc65969 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere <jo...@devlieghere.com> Date: Mon, 14 Oct 2024 14:16:58 -0700 Subject: [PATCH] [lldb] Replace CFPropertyListCreateXMLData with CFPropertyListCreateData (NFC) CFPropertyListCreateXMLData has been deprecated since macOS 10.10. Use CFPropertyListCreateData instead. --- lldb/cmake/modules/LLDBConfig.cmake | 2 -- lldb/source/Host/CMakeLists.txt | 3 +++ lldb/source/Host/macosx/objcxx/CMakeLists.txt | 4 +++- lldb/tools/debugserver/source/RNBServices.cpp | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake index a60921990cf775..93ccd9c479c2b8 100644 --- a/lldb/cmake/modules/LLDBConfig.cmake +++ b/lldb/cmake/modules/LLDBConfig.cmake @@ -188,7 +188,6 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include") if (LLVM_COMPILER_IS_GCC_COMPATIBLE) # Disable GCC warnings - append("-Wno-deprecated-declarations" CMAKE_CXX_FLAGS) append("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS) append("-Wno-strict-aliasing" CMAKE_CXX_FLAGS) @@ -198,7 +197,6 @@ endif() # Disable Clang warnings if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - append("-Wno-deprecated-register" CMAKE_CXX_FLAGS) append("-Wno-vla-extension" CMAKE_CXX_FLAGS) endif() diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt index c2e091ee8555b7..04090349cdd20c 100644 --- a/lldb/source/Host/CMakeLists.txt +++ b/lldb/source/Host/CMakeLists.txt @@ -177,3 +177,6 @@ add_lldb_library(lldbHost NO_PLUGIN_DEPENDENCIES Support ) +if (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + target_compile_options(lldbHost PRIVATE "-Wno-deprecated-declarations") +endif() diff --git a/lldb/source/Host/macosx/objcxx/CMakeLists.txt b/lldb/source/Host/macosx/objcxx/CMakeLists.txt index 273999f24380e5..1e693bed12ce15 100644 --- a/lldb/source/Host/macosx/objcxx/CMakeLists.txt +++ b/lldb/source/Host/macosx/objcxx/CMakeLists.txt @@ -16,4 +16,6 @@ add_lldb_library(lldbHostMacOSXObjCXX NO_PLUGIN_DEPENDENCIES TargetParser ) -target_compile_options(lldbHostMacOSXObjCXX PRIVATE -fno-objc-exceptions) +target_compile_options(lldbHostMacOSXObjCXX PRIVATE + -fno-objc-exceptions + -Wno-deprecated-declarations) diff --git a/lldb/tools/debugserver/source/RNBServices.cpp b/lldb/tools/debugserver/source/RNBServices.cpp index 6e4b55e3e6466d..bb57fb5ea027eb 100644 --- a/lldb/tools/debugserver/source/RNBServices.cpp +++ b/lldb/tools/debugserver/source/RNBServices.cpp @@ -208,8 +208,8 @@ int ListApplications(std::string &plist, bool opt_runningApps, GetProcesses(plistMutableArray.get(), all_users); #endif - CFReleaser<CFDataRef> plistData( - ::CFPropertyListCreateXMLData(alloc, plistMutableArray.get())); + CFReleaser<CFDataRef> plistData(::CFPropertyListCreateData( + alloc, plistMutableArray.get(), kCFPropertyListXMLFormat_v1_0, 0, NULL)); // write plist to service port if (plistData.get() != NULL) { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits