blob: f4da51650a7d04becfa8e0f11c2fef70de806913 [file] [log] [blame]
Michael Gottesman23a1ee52013-01-29 04:58:30 +00001//===-- ObjCARC.cpp -------------------------------------------------------===//
Michael Gottesman79d8d812013-01-28 01:35:51 +00002//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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 Gottesman79d8d812013-01-28 01:35:51 +00006//
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 Gottesman08904e32013-01-28 03:28:38 +000015#include "ObjCARC.h"
Benjamin Kramer6ecb1e72013-02-15 12:30:38 +000016#include "llvm-c/Initialization.h"
Michael Gottesman79d8d812013-01-28 01:35:51 +000017#include "llvm/InitializePasses.h"
Michael Gottesman79d8d812013-01-28 01:35:51 +000018
Michael Gottesman9bfcf282013-01-28 05:51:58 +000019namespace llvm {
20 class PassRegistry;
21}
22
Michael Gottesman79d8d812013-01-28 01:35:51 +000023using namespace llvm;
Michael Gottesman08904e32013-01-28 03:28:38 +000024using namespace llvm::objcarc;
25
Michael Gottesman79d8d812013-01-28 01:35:51 +000026/// initializeObjCARCOptsPasses - Initialize all passes linked into the
27/// ObjCARCOpts library.
28void llvm::initializeObjCARCOpts(PassRegistry &Registry) {
Chandler Carruth7b560d42015-09-09 17:55:00 +000029 initializeObjCARCAAWrapperPassPass(Registry);
Michael Gottesman79d8d812013-01-28 01:35:51 +000030 initializeObjCARCAPElimPass(Registry);
31 initializeObjCARCExpandPass(Registry);
32 initializeObjCARCContractPass(Registry);
33 initializeObjCARCOptPass(Registry);
Rafael Espindolaa3b5b602014-11-17 02:28:27 +000034 initializePAEvalPass(Registry);
Michael Gottesman79d8d812013-01-28 01:35:51 +000035}
36
37void LLVMInitializeObjCARCOpts(LLVMPassRegistryRef R) {
38 initializeObjCARCOpts(*unwrap(R));
39}