blob: 688dd12c408a37d3f06e94a505a4db8eabfc4976 [file] [log] [blame]
Michael Gottesman23a1ee52013-01-29 04:58:30 +00001//===-- ObjCARC.cpp -------------------------------------------------------===//
Michael Gottesman79d8d812013-01-28 01:35:51 +00002//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file implements common infrastructure for libLLVMObjCARCOpts.a, which
11// implements several scalar transformations over the LLVM intermediate
12// representation, including the C bindings for that library.
13//
14//===----------------------------------------------------------------------===//
15
Michael Gottesman08904e32013-01-28 03:28:38 +000016#include "ObjCARC.h"
Michael Gottesman9bfcf282013-01-28 05:51:58 +000017#include "llvm-c/Core.h"
Benjamin Kramer6ecb1e72013-02-15 12:30:38 +000018#include "llvm-c/Initialization.h"
Michael Gottesman79d8d812013-01-28 01:35:51 +000019#include "llvm/InitializePasses.h"
Michael Gottesman79d8d812013-01-28 01:35:51 +000020
Michael Gottesman9bfcf282013-01-28 05:51:58 +000021namespace llvm {
22 class PassRegistry;
23}
24
Michael Gottesman79d8d812013-01-28 01:35:51 +000025using namespace llvm;
Michael Gottesman08904e32013-01-28 03:28:38 +000026using namespace llvm::objcarc;
27
Michael Gottesman79d8d812013-01-28 01:35:51 +000028/// initializeObjCARCOptsPasses - Initialize all passes linked into the
29/// ObjCARCOpts library.
30void llvm::initializeObjCARCOpts(PassRegistry &Registry) {
Chandler Carruth7b560d42015-09-09 17:55:00 +000031 initializeObjCARCAAWrapperPassPass(Registry);
Michael Gottesman79d8d812013-01-28 01:35:51 +000032 initializeObjCARCAPElimPass(Registry);
33 initializeObjCARCExpandPass(Registry);
34 initializeObjCARCContractPass(Registry);
35 initializeObjCARCOptPass(Registry);
Rafael Espindolaa3b5b602014-11-17 02:28:27 +000036 initializePAEvalPass(Registry);
Michael Gottesman79d8d812013-01-28 01:35:51 +000037}
38
39void LLVMInitializeObjCARCOpts(LLVMPassRegistryRef R) {
40 initializeObjCARCOpts(*unwrap(R));
41}