ElimAvailExtern.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. //===- ElimAvailExtern.h - Optimize Global Variables ------------*- C++ -*-===//
  2. //
  3. // 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
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This transform is designed to eliminate available external global
  10. // definitions from the program, turning them into declarations.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_TRANSFORMS_IPO_ELIMAVAILEXTERN_H
  14. #define LLVM_TRANSFORMS_IPO_ELIMAVAILEXTERN_H
  15. #include "llvm/IR/PassManager.h"
  16. namespace llvm {
  17. class Module;
  18. /// A pass that transforms external global definitions into declarations.
  19. class EliminateAvailableExternallyPass
  20. : public PassInfoMixin<EliminateAvailableExternallyPass> {
  21. public:
  22. PreservedAnalyses run(Module &M, ModuleAnalysisManager &);
  23. };
  24. } // end namespace llvm
  25. #endif // LLVM_TRANSFORMS_IPO_ELIMAVAILEXTERN_H