Skip to content

Commit 0a3d748

Browse files
committed
Change cl option to -emit-core-mlir, change getContext to getMLIRContext()
1 parent 4f69f17 commit 0a3d748

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

clang/include/clang/CIR/CIRGenerator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class CIRGenerator : public clang::ASTConsumer {
5555
void Initialize(clang::ASTContext &astContext) override;
5656
bool HandleTopLevelDecl(clang::DeclGroupRef group) override;
5757
mlir::ModuleOp getModule() const;
58-
mlir::MLIRContext &getContext() { return *mlirContext; }
58+
mlir::MLIRContext &getMLIRContext() { return *mlirContext; }
5959
};
6060

6161
} // namespace cir

clang/include/clang/Driver/Options.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2987,8 +2987,8 @@ defm clangir : BoolFOption<"clangir",
29872987
BothFlags<[], [ClangOption, CC1Option], "">>;
29882988
def emit_cir : Flag<["-"], "emit-cir">, Visibility<[ClangOption, CC1Option]>,
29892989
Group<Action_Group>, HelpText<"Build ASTs and then lower to ClangIR">;
2990-
def emit_cir_mlir : Flag<["-"], "emit-cir-mlir">, Visibility<[CC1Option]>, Group<Action_Group>,
2991-
HelpText<"Build ASTs and then lower through ClangIR to MLIR, emit the .milr file">;
2990+
def emit_core_mlir : Flag<["-"], "emit-core-mlir">, Visibility<[CC1Option]>, Group<Action_Group>,
2991+
HelpText<"Build ASTs and then lower through ClangIR to core MLIR dialects, emit the .milr file">;
29922992
/// ClangIR-specific options - END
29932993

29942994
def flto_EQ : Joined<["-"], "flto=">,

clang/include/clang/Frontend/FrontendOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ enum ActionKind {
6969
EmitCIR,
7070

7171
/// Emit a .mlir file
72-
EmitMLIR,
72+
EmitCoreMLIR,
7373

7474
/// Emit a .ll file.
7575
EmitLLVM,

clang/lib/CIR/FrontendAction/CIRGenAction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class CIRGenConsumer : public clang::ASTConsumer {
8383
void HandleTranslationUnit(ASTContext &C) override {
8484
Gen->HandleTranslationUnit(C);
8585
mlir::ModuleOp MlirModule = Gen->getModule();
86-
mlir::MLIRContext &MlirCtx = Gen->getContext();
86+
mlir::MLIRContext &MlirCtx = Gen->getMLIRContext();
8787
switch (Action) {
8888
case CIRGenAction::OutputType::EmitCIR:
8989
if (OutputStream && MlirModule) {

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2740,7 +2740,7 @@ static const auto &getFrontendActionTable() {
27402740
{frontend::EmitAssembly, OPT_S},
27412741
{frontend::EmitBC, OPT_emit_llvm_bc},
27422742
{frontend::EmitCIR, OPT_emit_cir},
2743-
{frontend::EmitMLIR, OPT_emit_cir_mlir},
2743+
{frontend::EmitCoreMLIR, OPT_emit_core_mlir},
27442744
{frontend::EmitHTML, OPT_emit_html},
27452745
{frontend::EmitLLVM, OPT_emit_llvm},
27462746
{frontend::EmitLLVMOnly, OPT_emit_llvm_only},
@@ -4632,7 +4632,7 @@ static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) {
46324632
case frontend::EmitAssembly:
46334633
case frontend::EmitBC:
46344634
case frontend::EmitCIR:
4635-
case frontend::EmitMLIR:
4635+
case frontend::EmitCoreMLIR:
46364636
case frontend::EmitHTML:
46374637
case frontend::EmitLLVM:
46384638
case frontend::EmitLLVMOnly:

clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ CreateFrontendBaseAction(CompilerInstance &CI) {
8080
#else
8181
llvm_unreachable("CIR suppport not built into clang");
8282
#endif
83-
case EmitMLIR:
83+
case EmitCoreMLIR:
8484
#if CLANG_ENABLE_CIR
8585
return std::make_unique<cir::EmitMLIRAction>();
8686
#else

clang/test/CIR/Lowering/ThroughMLIR/global-ptrs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir-mlir %s -o %t.mlir
1+
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-core-mlir %s -o %t.mlir
22
// RUN: FileCheck --input-file=%t.mlir %s
33

44
// XFAIL: *

clang/test/CIR/Lowering/ThroughMLIR/global.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir-mlir %s -o %t.mlir
1+
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-core-mlir %s -o %t.mlir
22
// RUN: FileCheck --input-file=%t.mlir %s
33

44
char c;

0 commit comments

Comments
 (0)