Skip to content

Commit c4a0197

Browse files
authored
[Clang] Remove ARCMigrate (#119269)
In the discussion around #116792, @rjmccall mentioned that ARCMigrate has been obsoleted and that we could go ahead and remove it from Clang, so this patch does just that.
1 parent 11026a8 commit c4a0197

File tree

232 files changed

+28
-24058
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+28
-24058
lines changed

clang/CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -432,18 +432,16 @@ if(NOT LLVM_STATIC_LINK_CXX_STDLIB)
432432
set(HAVE_CLANG_REPL_SUPPORT ON)
433433
endif()
434434

435-
option(CLANG_ENABLE_ARCMT "Build ARCMT." ON)
435+
option(CLANG_ENABLE_OBJC_REWRITER "Build the Objective-C rewriter tool" OFF)
436+
436437
option(CLANG_ENABLE_STATIC_ANALYZER
437438
"Include static analyzer in clang binary." ON)
438439

439440
option(CLANG_ENABLE_PROTO_FUZZER "Build Clang protobuf fuzzer." OFF)
440441

441-
if(NOT CLANG_ENABLE_STATIC_ANALYZER AND CLANG_ENABLE_ARCMT)
442-
message(FATAL_ERROR "Cannot disable static analyzer while enabling ARCMT or Z3")
443-
endif()
444-
445-
if(CLANG_ENABLE_ARCMT)
446-
set(CLANG_ENABLE_OBJC_REWRITER ON)
442+
if (DEFINED CLANG_ENABLE_ARCMT)
443+
set(CLANG_ENABLE_OBJC_REWRITER ${CLANG_ENABLE_ARCMT})
444+
message(DEPRECATION "'CLANG_ENABLE_ARCMT' is deprecated as ARCMigrate has been removed from Clang. Please use 'CLANG_ENABLE_OBJC_REWRITER' instead to enable or disable the Objective-C rewriter.")
447445
endif()
448446

449447
# This option is a stop-gap, we should commit to removing this as

clang/cmake/caches/Android.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
set(LLVM_TARGETS_TO_BUILD X86 CACHE STRING "")
44

5-
set(CLANG_ENABLE_ARCMT OFF CACHE BOOL "")
65
set(CLANG_ENABLE_STATIC_ANALYZER OFF CACHE BOOL "")
76
set(CLANG_TIDY_ENABLE_STATIC_ANALYZER OFF CACHE BOOL "")
87
set(CLANG_VENDOR Android CACHE STRING "")

clang/cmake/caches/Fuchsia-stage2.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
4444
set(CLANG_DEFAULT_OBJCOPY llvm-objcopy CACHE STRING "")
4545
set(CLANG_DEFAULT_RTLIB compiler-rt CACHE STRING "")
4646
set(CLANG_DEFAULT_UNWINDLIB libunwind CACHE STRING "")
47-
set(CLANG_ENABLE_ARCMT OFF CACHE BOOL "")
4847
set(CLANG_ENABLE_STATIC_ANALYZER ON CACHE BOOL "")
4948
set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
5049

clang/cmake/caches/Fuchsia.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
8484
set(CLANG_DEFAULT_OBJCOPY llvm-objcopy CACHE STRING "")
8585
set(CLANG_DEFAULT_RTLIB compiler-rt CACHE STRING "")
8686
set(CLANG_DEFAULT_UNWINDLIB libunwind CACHE STRING "")
87-
set(CLANG_ENABLE_ARCMT OFF CACHE BOOL "")
8887
set(CLANG_ENABLE_STATIC_ANALYZER OFF CACHE BOOL "")
8988
set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
9089

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or the
3434
Potentially Breaking Changes
3535
============================
3636

37+
- The Objective-C ARC migrator (ARCMigrate) has been removed.
38+
3739
C/C++ Language Potentially Breaking Changes
3840
-------------------------------------------
3941

clang/include/clang-c/Index.h

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -5905,66 +5905,6 @@ CINDEX_LINKAGE const char *clang_EvalResult_getAsStr(CXEvalResult E);
59055905
* Disposes the created Eval memory.
59065906
*/
59075907
CINDEX_LINKAGE void clang_EvalResult_dispose(CXEvalResult E);
5908-
/**
5909-
* @}
5910-
*/
5911-
5912-
/** \defgroup CINDEX_REMAPPING Remapping functions
5913-
*
5914-
* @{
5915-
*/
5916-
5917-
/**
5918-
* A remapping of original source files and their translated files.
5919-
*/
5920-
typedef void *CXRemapping;
5921-
5922-
/**
5923-
* Retrieve a remapping.
5924-
*
5925-
* \param path the path that contains metadata about remappings.
5926-
*
5927-
* \returns the requested remapping. This remapping must be freed
5928-
* via a call to \c clang_remap_dispose(). Can return NULL if an error occurred.
5929-
*/
5930-
CINDEX_LINKAGE CXRemapping clang_getRemappings(const char *path);
5931-
5932-
/**
5933-
* Retrieve a remapping.
5934-
*
5935-
* \param filePaths pointer to an array of file paths containing remapping info.
5936-
*
5937-
* \param numFiles number of file paths.
5938-
*
5939-
* \returns the requested remapping. This remapping must be freed
5940-
* via a call to \c clang_remap_dispose(). Can return NULL if an error occurred.
5941-
*/
5942-
CINDEX_LINKAGE
5943-
CXRemapping clang_getRemappingsFromFileList(const char **filePaths,
5944-
unsigned numFiles);
5945-
5946-
/**
5947-
* Determine the number of remappings.
5948-
*/
5949-
CINDEX_LINKAGE unsigned clang_remap_getNumFiles(CXRemapping);
5950-
5951-
/**
5952-
* Get the original and the associated filename from the remapping.
5953-
*
5954-
* \param original If non-NULL, will be set to the original filename.
5955-
*
5956-
* \param transformed If non-NULL, will be set to the filename that the original
5957-
* is associated with.
5958-
*/
5959-
CINDEX_LINKAGE void clang_remap_getFilenames(CXRemapping, unsigned index,
5960-
CXString *original,
5961-
CXString *transformed);
5962-
5963-
/**
5964-
* Dispose the remapping.
5965-
*/
5966-
CINDEX_LINKAGE void clang_remap_dispose(CXRemapping);
5967-
59685908
/**
59695909
* @}
59705910
*/

clang/include/clang/ARCMigrate/ARCMT.h

Lines changed: 0 additions & 130 deletions
This file was deleted.

clang/include/clang/ARCMigrate/ARCMTActions.h

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)