ObjCARC.cpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //===-- ObjCARC.cpp -------------------------------------------------------===//
  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 file implements common infrastructure for libLLVMObjCARCOpts.a, which
  10. // implements several scalar transformations over the LLVM intermediate
  11. // representation, including the C bindings for that library.
  12. //
  13. //===----------------------------------------------------------------------===//
  14. #include "ObjCARC.h"
  15. #include "llvm-c/Initialization.h"
  16. #include "llvm/InitializePasses.h"
  17. namespace llvm {
  18. class PassRegistry;
  19. }
  20. using namespace llvm;
  21. using namespace llvm::objcarc;
  22. /// initializeObjCARCOptsPasses - Initialize all passes linked into the
  23. /// ObjCARCOpts library.
  24. void llvm::initializeObjCARCOpts(PassRegistry &Registry) {
  25. initializeObjCARCAAWrapperPassPass(Registry);
  26. initializeObjCARCAPElimPass(Registry);
  27. initializeObjCARCExpandPass(Registry);
  28. initializeObjCARCContractLegacyPassPass(Registry);
  29. initializeObjCARCOptLegacyPassPass(Registry);
  30. initializePAEvalPass(Registry);
  31. }
  32. void LLVMInitializeObjCARCOpts(LLVMPassRegistryRef R) {
  33. initializeObjCARCOpts(*unwrap(R));
  34. }