blob: a89df95385c8515652144771bec745803f17bacc [file] [log] [blame]
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01001//===-- ObjCARC.h - ObjCARC Scalar Transformations --------------*- C++ -*-===//
2//
Andrew Walbran16937d02019-10-22 13:54:20 +01003// 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
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01006//
7//===----------------------------------------------------------------------===//
8//
9// This header file defines prototypes for accessor functions that expose passes
10// in the ObjCARC Scalar Transformations library.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_TRANSFORMS_OBJCARC_H
15#define LLVM_TRANSFORMS_OBJCARC_H
16
Olivier Deprezf4ef2d02021-04-20 13:36:24 +020017#include "llvm/IR/PassManager.h"
18
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010019namespace llvm {
20
21class Pass;
22
23//===----------------------------------------------------------------------===//
24//
25// ObjCARCAPElim - ObjC ARC autorelease pool elimination.
26//
27Pass *createObjCARCAPElimPass();
28
29//===----------------------------------------------------------------------===//
30//
31// ObjCARCExpand - ObjC ARC preliminary simplifications.
32//
33Pass *createObjCARCExpandPass();
34
35//===----------------------------------------------------------------------===//
36//
37// ObjCARCContract - Late ObjC ARC cleanups.
38//
39Pass *createObjCARCContractPass();
40
41//===----------------------------------------------------------------------===//
42//
43// ObjCARCOpt - ObjC ARC optimization.
44//
45Pass *createObjCARCOptPass();
46
Olivier Deprezf4ef2d02021-04-20 13:36:24 +020047struct ObjCARCOptPass : public PassInfoMixin<ObjCARCOptPass> {
48 PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
49};
50
51struct ObjCARCContractPass : public PassInfoMixin<ObjCARCContractPass> {
52 PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
53};
54
55struct ObjCARCAPElimPass : public PassInfoMixin<ObjCARCAPElimPass> {
56 PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
57};
58
59struct ObjCARCExpandPass : public PassInfoMixin<ObjCARCExpandPass> {
60 PreservedAnalyses run(Function &M, FunctionAnalysisManager &AM);
61};
62
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010063} // End llvm namespace
64
65#endif