@@ -158,7 +158,7 @@ void CIRGenFunction::declare(mlir::Value addrVal, const Decl *var, QualType ty,
158158
159159void CIRGenFunction::LexicalScope::cleanup () {
160160 CIRGenBuilderTy &builder = cgf.builder ;
161- LexicalScope *localScope = cgf.currLexScope ;
161+ LexicalScope *localScope = cgf.curLexScope ;
162162
163163 if (returnBlock != nullptr ) {
164164 // Write out the return block, which loads the value from `__retval` and
@@ -168,16 +168,16 @@ void CIRGenFunction::LexicalScope::cleanup() {
168168 (void )emitReturn (*returnLoc);
169169 }
170170
171- mlir::Block *currBlock = builder.getBlock ();
172- if (isGlobalInit () && !currBlock )
171+ mlir::Block *curBlock = builder.getBlock ();
172+ if (isGlobalInit () && !curBlock )
173173 return ;
174- if (currBlock ->mightHaveTerminator () && currBlock ->getTerminator ())
174+ if (curBlock ->mightHaveTerminator () && curBlock ->getTerminator ())
175175 return ;
176176
177177 // Get rid of any empty block at the end of the scope.
178178 bool entryBlock = builder.getInsertionBlock ()->isEntryBlock ();
179- if (!entryBlock && currBlock ->empty ()) {
180- currBlock ->erase ();
179+ if (!entryBlock && curBlock ->empty ()) {
180+ curBlock ->erase ();
181181 if (returnBlock != nullptr && returnBlock->getUses ().empty ())
182182 returnBlock->erase ();
183183 return ;
@@ -186,7 +186,7 @@ void CIRGenFunction::LexicalScope::cleanup() {
186186 // Reached the end of the scope.
187187 {
188188 mlir::OpBuilder::InsertionGuard guard (builder);
189- builder.setInsertionPointToEnd (currBlock );
189+ builder.setInsertionPointToEnd (curBlock );
190190
191191 if (localScope->depth == 0 ) {
192192 // Reached the end of the function.
@@ -203,7 +203,7 @@ void CIRGenFunction::LexicalScope::cleanup() {
203203 }
204204 // Reached the end of a non-function scope. Some scopes, such as those
205205 // used with the ?: operator, can return a value.
206- if (!localScope->isTernary () && !currBlock ->mightHaveTerminator ()) {
206+ if (!localScope->isTernary () && !curBlock ->mightHaveTerminator ()) {
207207 !retVal ? builder.create <cir::YieldOp>(localScope->endLoc )
208208 : builder.create <cir::YieldOp>(localScope->endLoc , retVal);
209209 }
@@ -223,7 +223,7 @@ cir::ReturnOp CIRGenFunction::LexicalScope::emitReturn(mlir::Location loc) {
223223 return builder.create <cir::ReturnOp>(loc);
224224}
225225
226- // This is copyied from CodeGenModule::MayDropFunctionReturn. This is a
226+ // This is copied from CodeGenModule::MayDropFunctionReturn. This is a
227227// candidate for sharing between CIRGen and CodeGen.
228228static bool mayDropFunctionReturn (const ASTContext &astContext,
229229 QualType returnType) {
@@ -239,7 +239,7 @@ static bool mayDropFunctionReturn(const ASTContext &astContext,
239239
240240void CIRGenFunction::LexicalScope::emitImplicitReturn () {
241241 CIRGenBuilderTy &builder = cgf.getBuilder ();
242- LexicalScope *localScope = cgf.currLexScope ;
242+ LexicalScope *localScope = cgf.curLexScope ;
243243
244244 const auto *fd = cast<clang::FunctionDecl>(cgf.curGD .getDecl ());
245245
0 commit comments