13dcfdab267f157aeb0e6aed896f7acdeb11481baMichael Gottesman//===-- ObjCARC.cpp -------------------------------------------------------===//
224c4898973a074713201fb9351d302b9f7733e92Michael Gottesman//
324c4898973a074713201fb9351d302b9f7733e92Michael Gottesman//                     The LLVM Compiler Infrastructure
424c4898973a074713201fb9351d302b9f7733e92Michael Gottesman//
524c4898973a074713201fb9351d302b9f7733e92Michael Gottesman// This file is distributed under the University of Illinois Open Source
624c4898973a074713201fb9351d302b9f7733e92Michael Gottesman// License. See LICENSE.TXT for details.
724c4898973a074713201fb9351d302b9f7733e92Michael Gottesman//
824c4898973a074713201fb9351d302b9f7733e92Michael Gottesman//===----------------------------------------------------------------------===//
924c4898973a074713201fb9351d302b9f7733e92Michael Gottesman//
1024c4898973a074713201fb9351d302b9f7733e92Michael Gottesman// This file implements common infrastructure for libLLVMObjCARCOpts.a, which
1124c4898973a074713201fb9351d302b9f7733e92Michael Gottesman// implements several scalar transformations over the LLVM intermediate
1224c4898973a074713201fb9351d302b9f7733e92Michael Gottesman// representation, including the C bindings for that library.
1324c4898973a074713201fb9351d302b9f7733e92Michael Gottesman//
1424c4898973a074713201fb9351d302b9f7733e92Michael Gottesman//===----------------------------------------------------------------------===//
1524c4898973a074713201fb9351d302b9f7733e92Michael Gottesman
166504255a2257c53df8ab191c1db4517139f5dc8cMichael Gottesman#include "ObjCARC.h"
17074ddd6f014b8b3488e53d22a961874230afb0d5Michael Gottesman#include "llvm-c/Core.h"
1874b3c8da4800c7e8ba8f019879db29738ecc5f74Benjamin Kramer#include "llvm-c/Initialization.h"
1924c4898973a074713201fb9351d302b9f7733e92Michael Gottesman#include "llvm/InitializePasses.h"
2024c4898973a074713201fb9351d302b9f7733e92Michael Gottesman
21074ddd6f014b8b3488e53d22a961874230afb0d5Michael Gottesmannamespace llvm {
22074ddd6f014b8b3488e53d22a961874230afb0d5Michael Gottesman  class PassRegistry;
23074ddd6f014b8b3488e53d22a961874230afb0d5Michael Gottesman}
24074ddd6f014b8b3488e53d22a961874230afb0d5Michael Gottesman
2524c4898973a074713201fb9351d302b9f7733e92Michael Gottesmanusing namespace llvm;
266504255a2257c53df8ab191c1db4517139f5dc8cMichael Gottesmanusing namespace llvm::objcarc;
276504255a2257c53df8ab191c1db4517139f5dc8cMichael Gottesman
2824c4898973a074713201fb9351d302b9f7733e92Michael Gottesman/// initializeObjCARCOptsPasses - Initialize all passes linked into the
2924c4898973a074713201fb9351d302b9f7733e92Michael Gottesman/// ObjCARCOpts library.
3024c4898973a074713201fb9351d302b9f7733e92Michael Gottesmanvoid llvm::initializeObjCARCOpts(PassRegistry &Registry) {
31f3ef5332fa3f4d5ec72c178a2b19dac363a19383Pirama Arumuga Nainar  initializeObjCARCAAWrapperPassPass(Registry);
3224c4898973a074713201fb9351d302b9f7733e92Michael Gottesman  initializeObjCARCAPElimPass(Registry);
3324c4898973a074713201fb9351d302b9f7733e92Michael Gottesman  initializeObjCARCExpandPass(Registry);
3424c4898973a074713201fb9351d302b9f7733e92Michael Gottesman  initializeObjCARCContractPass(Registry);
3524c4898973a074713201fb9351d302b9f7733e92Michael Gottesman  initializeObjCARCOptPass(Registry);
3637ed9c199ca639565f6ce88105f9e39e898d82d0Stephen Hines  initializePAEvalPass(Registry);
3724c4898973a074713201fb9351d302b9f7733e92Michael Gottesman}
3824c4898973a074713201fb9351d302b9f7733e92Michael Gottesman
3924c4898973a074713201fb9351d302b9f7733e92Michael Gottesmanvoid LLVMInitializeObjCARCOpts(LLVMPassRegistryRef R) {
4024c4898973a074713201fb9351d302b9f7733e92Michael Gottesman  initializeObjCARCOpts(*unwrap(R));
4124c4898973a074713201fb9351d302b9f7733e92Michael Gottesman}
42