| Michael Gottesman | 23a1ee5 | 2013-01-29 04:58:30 +0000 | [diff] [blame] | 1 | //===-- ObjCARC.cpp -------------------------------------------------------===// |
| Michael Gottesman | 79d8d81 | 2013-01-28 01:35:51 +0000 | [diff] [blame] | 2 | // |
| Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| Michael Gottesman | 79d8d81 | 2013-01-28 01:35:51 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // This file implements common infrastructure for libLLVMObjCARCOpts.a, which |
| 10 | // implements several scalar transformations over the LLVM intermediate |
| 11 | // representation, including the C bindings for that library. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| Michael Gottesman | 08904e3 | 2013-01-28 03:28:38 +0000 | [diff] [blame] | 15 | #include "ObjCARC.h" |
| Benjamin Kramer | 6ecb1e7 | 2013-02-15 12:30:38 +0000 | [diff] [blame] | 16 | #include "llvm-c/Initialization.h" |
| Michael Gottesman | 79d8d81 | 2013-01-28 01:35:51 +0000 | [diff] [blame] | 17 | #include "llvm/InitializePasses.h" |
| Michael Gottesman | 79d8d81 | 2013-01-28 01:35:51 +0000 | [diff] [blame] | 18 | |
| Michael Gottesman | 9bfcf28 | 2013-01-28 05:51:58 +0000 | [diff] [blame] | 19 | namespace llvm { |
| 20 | class PassRegistry; |
| 21 | } |
| 22 | |
| Michael Gottesman | 79d8d81 | 2013-01-28 01:35:51 +0000 | [diff] [blame] | 23 | using namespace llvm; |
| Michael Gottesman | 08904e3 | 2013-01-28 03:28:38 +0000 | [diff] [blame] | 24 | using namespace llvm::objcarc; |
| 25 | |
| Michael Gottesman | 79d8d81 | 2013-01-28 01:35:51 +0000 | [diff] [blame] | 26 | /// initializeObjCARCOptsPasses - Initialize all passes linked into the |
| 27 | /// ObjCARCOpts library. |
| 28 | void llvm::initializeObjCARCOpts(PassRegistry &Registry) { |
| Chandler Carruth | 7b560d4 | 2015-09-09 17:55:00 +0000 | [diff] [blame] | 29 | initializeObjCARCAAWrapperPassPass(Registry); |
| Michael Gottesman | 79d8d81 | 2013-01-28 01:35:51 +0000 | [diff] [blame] | 30 | initializeObjCARCAPElimPass(Registry); |
| 31 | initializeObjCARCExpandPass(Registry); |
| 32 | initializeObjCARCContractPass(Registry); |
| 33 | initializeObjCARCOptPass(Registry); |
| Rafael Espindola | a3b5b60 | 2014-11-17 02:28:27 +0000 | [diff] [blame] | 34 | initializePAEvalPass(Registry); |
| Michael Gottesman | 79d8d81 | 2013-01-28 01:35:51 +0000 | [diff] [blame] | 35 | } |
| 36 | |
| 37 | void LLVMInitializeObjCARCOpts(LLVMPassRegistryRef R) { |
| 38 | initializeObjCARCOpts(*unwrap(R)); |
| 39 | } |