MachineFunctionInitializer.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //===- MachineFunctionInitalizer.h - machine function initializer ---------===//
  2. //
  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 declares an interface that allows custom machine function
  11. // initialization.
  12. //
  13. //===----------------------------------------------------------------------===//
  14. #ifndef LLVM_CODEGEN_MACHINEFUNCTIONINITIALIZER_H
  15. #define LLVM_CODEGEN_MACHINEFUNCTIONINITIALIZER_H
  16. namespace llvm {
  17. class MachineFunction;
  18. /// This interface provides a way to initialize machine functions after they are
  19. /// created by the machine function analysis pass.
  20. class MachineFunctionInitializer {
  21. virtual void anchor();
  22. public:
  23. virtual ~MachineFunctionInitializer() {}
  24. /// Initialize the machine function.
  25. ///
  26. /// Return true if error occurred.
  27. virtual bool initializeMachineFunction(MachineFunction &MF) = 0;
  28. };
  29. } // end namespace llvm
  30. #endif