InferFunctionAttrs.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===-- InferFunctionAttrs.h - Infer implicit function attributes ---------===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. ///
  14. /// \file
  15. /// Interfaces for passes which infer implicit function attributes from the
  16. /// name and signature of function declarations.
  17. ///
  18. //===----------------------------------------------------------------------===//
  19. #ifndef LLVM_TRANSFORMS_IPO_INFERFUNCTIONATTRS_H
  20. #define LLVM_TRANSFORMS_IPO_INFERFUNCTIONATTRS_H
  21. #include "llvm/IR/PassManager.h"
  22. namespace llvm {
  23. class Module;
  24. class Pass;
  25. /// A pass which infers function attributes from the names and signatures of
  26. /// function declarations in a module.
  27. struct InferFunctionAttrsPass : PassInfoMixin<InferFunctionAttrsPass> {
  28. PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
  29. };
  30. /// Create a legacy pass manager instance of a pass to infer function
  31. /// attributes.
  32. Pass *createInferFunctionAttrsLegacyPass();
  33. }
  34. #endif // LLVM_TRANSFORMS_IPO_INFERFUNCTIONATTRS_H
  35. #ifdef __GNUC__
  36. #pragma GCC diagnostic pop
  37. #endif