llvm/llvm/include/llvm/IR/LegacyPassManager.h

//===- LegacyPassManager.h - Legacy Container for Passes --------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file defines the legacy PassManager class.  This class is used to hold,
// maintain, and optimize execution of Passes.  The PassManager class ensures
// that analysis results are available before a pass runs, and that Pass's are
// destroyed when the PassManager is destroyed.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_IR_LEGACYPASSMANAGER_H
#define LLVM_IR_LEGACYPASSMANAGER_H

#include "llvm/Support/CBindingWrapping.h"

namespace llvm {

class Function;
class Pass;
class Module;

namespace legacy {

// Whether or not -debug-pass has been specified. For use to check if it's
// specified alongside the new PM.
bool debugPassSpecified();

class PassManagerImpl;
class FunctionPassManagerImpl;

/// PassManagerBase - An abstract interface to allow code to add passes to
/// a pass manager without having to hard-code what kind of pass manager
/// it is.
class PassManagerBase {};

/// PassManager manages ModulePassManagers
class PassManager : public PassManagerBase {};

/// FunctionPassManager manages FunctionPasses.
class FunctionPassManager : public PassManagerBase {};

} // End legacy namespace

// Create wrappers for C Binding types (see CBindingWrapping.h).
DEFINE_STDCXX_CONVERSION_FUNCTIONS()

} // End llvm namespace

#endif