@@ -50,7 +50,7 @@ mlir::Location CIRGenModule::getLoc(SourceRange cRange) {
5050 return mlir::FusedLoc::get ({begin, end}, metadata, builder.getContext ());
5151}
5252
53- void CIRGenModule::emitGlobal (clang::GlobalDecl gd) {
53+ void CIRGenModule::buildGlobal (clang::GlobalDecl gd) {
5454 const auto *global = cast<ValueDecl>(gd.getDecl ());
5555
5656 if (const auto *fd = dyn_cast<FunctionDecl>(global)) {
@@ -71,19 +71,19 @@ void CIRGenModule::emitGlobal(clang::GlobalDecl gd) {
7171 }
7272
7373 // TODO(CIR): Defer emitting some global definitions until later
74- emitGlobalDefinition (gd);
74+ buildGlobalDefinition (gd);
7575}
7676
77- void CIRGenModule::emitGlobalFunctionDefinition (clang::GlobalDecl gd,
78- mlir::Operation *op) {
77+ void CIRGenModule::buildGlobalFunctionDefinition (clang::GlobalDecl gd,
78+ mlir::Operation *op) {
7979 auto const *funcDecl = cast<FunctionDecl>(gd.getDecl ());
8080 auto funcOp = builder.create <cir::FuncOp>(
8181 getLoc (funcDecl->getSourceRange ()), funcDecl->getIdentifier ()->getName ());
8282 theModule.push_back (funcOp);
8383}
8484
85- void CIRGenModule::emitGlobalDefinition (clang::GlobalDecl gd,
86- mlir::Operation *op) {
85+ void CIRGenModule::buildGlobalDefinition (clang::GlobalDecl gd,
86+ mlir::Operation *op) {
8787 const auto *decl = cast<ValueDecl>(gd.getDecl ());
8888 if (const auto *fd = dyn_cast<FunctionDecl>(decl)) {
8989 // TODO(CIR): Skip generation of CIR for functions with available_externally
@@ -99,15 +99,15 @@ void CIRGenModule::emitGlobalDefinition(clang::GlobalDecl gd,
9999
100100 if (fd->isMultiVersion ())
101101 errorNYI (fd->getSourceRange (), " multiversion functions" );
102- emitGlobalFunctionDefinition (gd, op);
102+ buildGlobalFunctionDefinition (gd, op);
103103 return ;
104104 }
105105
106- llvm_unreachable (" Invalid argument to CIRGenModule::emitGlobalDefinition " );
106+ llvm_unreachable (" Invalid argument to CIRGenModule::buildGlobalDefinition " );
107107}
108108
109109// Emit code for a single top level declaration.
110- void CIRGenModule::emitTopLevelDecl (Decl *decl) {
110+ void CIRGenModule::buildTopLevelDecl (Decl *decl) {
111111
112112 // Ignore dependent declarations.
113113 if (decl->isTemplated ())
@@ -123,7 +123,7 @@ void CIRGenModule::emitTopLevelDecl(Decl *decl) {
123123 auto *fd = cast<FunctionDecl>(decl);
124124 // Consteval functions shouldn't be emitted.
125125 if (!fd->isConsteval ())
126- emitGlobal (fd);
126+ buildGlobal (fd);
127127 break ;
128128 }
129129 }
0 commit comments