//===-- MachineFunctionPrinterPass.cpp ------------------------------------===// // // 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 // //===----------------------------------------------------------------------===// // // MachineFunctionPrinterPass implementation. // //===----------------------------------------------------------------------===// #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/SlotIndexes.h" #include "llvm/IR/PrintPasses.h" #include "llvm/InitializePasses.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" usingnamespacellvm; namespace { /// MachineFunctionPrinterPass - This is a pass to dump the IR of a /// MachineFunction. /// struct MachineFunctionPrinterPass : public MachineFunctionPass { … }; char MachineFunctionPrinterPass::ID = …; } char &llvm::MachineFunctionPrinterPassID = …; INITIALIZE_PASS(…) namespace llvm { /// Returns a newly-created MachineFunction Printer pass. The /// default banner is empty. /// MachineFunctionPass *createMachineFunctionPrinterPass(raw_ostream &OS, const std::string &Banner){ … } }