@@ -62,17 +62,16 @@ class CIRGenConsumer : public clang::ASTConsumer {
6262 IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS;
6363 std::unique_ptr<CIRGenerator> Gen;
6464 const FrontendOptions &FEOptions;
65- CodeGenOptions &codeGenOptions ;
65+ CodeGenOptions &CGO ;
6666
6767public:
6868 CIRGenConsumer (CIRGenAction::OutputType Action, CompilerInstance &CI,
69- CodeGenOptions &codeGenOptions,
70- std::unique_ptr<raw_pwrite_stream> OS)
69+ CodeGenOptions &CGO, std::unique_ptr<raw_pwrite_stream> OS)
7170 : Action(Action), CI(CI), OutputStream(std::move(OS)),
7271 FS (&CI.getVirtualFileSystem()),
7372 Gen(std::make_unique<CIRGenerator>(CI.getDiagnostics(), std::move(FS),
7473 CI.getCodeGenOpts())),
75- FEOptions(CI.getFrontendOpts()), codeGenOptions(codeGenOptions ) {}
74+ FEOptions(CI.getFrontendOpts()), CGO(CGO ) {}
7675
7776 void Initialize (ASTContext &Ctx) override {
7877 assert (!Context && " initialized multiple times" );
@@ -105,7 +104,7 @@ class CIRGenConsumer : public clang::ASTConsumer {
105104 // Setup and run CIR pipeline.
106105 if (runCIRToCIRPasses (MlirModule, MlirCtx, C,
107106 !FEOptions.ClangIRDisableCIRVerifier ,
108- codeGenOptions .OptimizationLevel > 0 )
107+ CGO .OptimizationLevel > 0 )
109108 .failed ()) {
110109 CI.getDiagnostics ().Report (diag::err_cir_to_cir_transform_failed);
111110 return ;
@@ -142,7 +141,7 @@ class CIRGenConsumer : public clang::ASTConsumer {
142141void CIRGenConsumer::anchor () {}
143142
144143CIRGenAction::CIRGenAction (OutputType Act, mlir::MLIRContext *MLIRCtx)
145- : MLIRCtx(MLIRCtx ? MLIRCtx : new mlir::MLIRContext), action (Act) {}
144+ : MLIRCtx(MLIRCtx ? MLIRCtx : new mlir::MLIRContext), Action (Act) {}
146145
147146CIRGenAction::~CIRGenAction () { MLIRMod.release (); }
148147
@@ -165,14 +164,14 @@ getOutputStream(CompilerInstance &CI, StringRef InFile,
165164}
166165
167166std::unique_ptr<ASTConsumer>
168- CIRGenAction::CreateASTConsumer (CompilerInstance &ci , StringRef inFile ) {
169- std::unique_ptr<llvm::raw_pwrite_stream> out = ci .takeOutputStream ();
167+ CIRGenAction::CreateASTConsumer (CompilerInstance &CI , StringRef InFile ) {
168+ std::unique_ptr<llvm::raw_pwrite_stream> Out = CI .takeOutputStream ();
170169
171- if (!out )
172- out = getOutputStream (ci, inFile, action );
170+ if (!Out )
171+ Out = getOutputStream (CI, InFile, Action );
173172
174173 auto Result = std::make_unique<cir::CIRGenConsumer>(
175- action, ci, ci .getCodeGenOpts (), std::move (out ));
174+ Action, CI, CI .getCodeGenOpts (), std::move (Out ));
176175
177176 return Result;
178177}
0 commit comments