Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:36:27

0001 //===--- ARCMTActions.h - ARC Migrate Tool Frontend Actions -----*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_CLANG_ARCMIGRATE_ARCMTACTIONS_H
0010 #define LLVM_CLANG_ARCMIGRATE_ARCMTACTIONS_H
0011 
0012 #include "clang/ARCMigrate/FileRemapper.h"
0013 #include "clang/Frontend/FrontendAction.h"
0014 #include <memory>
0015 
0016 namespace clang {
0017 namespace arcmt {
0018 
0019 class CheckAction : public WrapperFrontendAction {
0020 protected:
0021   bool BeginInvocation(CompilerInstance &CI) override;
0022 
0023 public:
0024   CheckAction(std::unique_ptr<FrontendAction> WrappedAction);
0025 };
0026 
0027 class ModifyAction : public WrapperFrontendAction {
0028 protected:
0029   bool BeginInvocation(CompilerInstance &CI) override;
0030 
0031 public:
0032   ModifyAction(std::unique_ptr<FrontendAction> WrappedAction);
0033 };
0034 
0035 class MigrateSourceAction : public ASTFrontendAction {
0036   FileRemapper Remapper;
0037 protected:
0038   bool BeginInvocation(CompilerInstance &CI) override;
0039   std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
0040                                                  StringRef InFile) override;
0041 };
0042 
0043 class MigrateAction : public WrapperFrontendAction {
0044   std::string MigrateDir;
0045   std::string PlistOut;
0046   bool EmitPremigrationARCErrors;
0047 protected:
0048   bool BeginInvocation(CompilerInstance &CI) override;
0049 
0050 public:
0051   MigrateAction(std::unique_ptr<FrontendAction> WrappedAction,
0052                 StringRef migrateDir,
0053                 StringRef plistOut,
0054                 bool emitPremigrationARCErrors);
0055 };
0056 
0057 /// Migrates to modern ObjC syntax.
0058 class ObjCMigrateAction : public WrapperFrontendAction {
0059   std::string MigrateDir;
0060   unsigned    ObjCMigAction;
0061   FileRemapper Remapper;
0062   CompilerInstance *CompInst;
0063 public:
0064   ObjCMigrateAction(std::unique_ptr<FrontendAction> WrappedAction,
0065                     StringRef migrateDir, unsigned migrateAction);
0066 
0067 protected:
0068   std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
0069                                                  StringRef InFile) override;
0070   bool BeginInvocation(CompilerInstance &CI) override;
0071 };
0072 
0073 }
0074 }
0075 
0076 #endif