[clang] 3ed91d8 - [CIR][NFC] Fix build issue after AST modification (#156493)

via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 2 10:35:02 PDT 2025


Author: Amr Hesham
Date: 2025-09-02T19:34:58+02:00
New Revision: 3ed91d880996976303e31b1900fb1fba9cd3ab44

URL: https://github.com/llvm/llvm-project/commit/3ed91d880996976303e31b1900fb1fba9cd3ab44
DIFF: https://github.com/llvm/llvm-project/commit/3ed91d880996976303e31b1900fb1fba9cd3ab44.diff

LOG: [CIR][NFC] Fix build issue after AST modification (#156493)

Fix the build issue after AST modification

Added: 
    

Modified: 
    clang/lib/CIR/CodeGen/CIRGenStmt.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CIR/CodeGen/CIRGenStmt.cpp b/clang/lib/CIR/CodeGen/CIRGenStmt.cpp
index 3b0eabe92284b..12821c1dae0c1 100644
--- a/clang/lib/CIR/CodeGen/CIRGenStmt.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenStmt.cpp
@@ -508,7 +508,7 @@ mlir::LogicalResult CIRGenFunction::emitGotoStmt(const clang::GotoStmt &s) {
 
 mlir::LogicalResult
 CIRGenFunction::emitContinueStmt(const clang::ContinueStmt &s) {
-  builder.createContinue(getLoc(s.getContinueLoc()));
+  builder.createContinue(getLoc(s.getKwLoc()));
 
   // Insert the new block to continue codegen after the continue statement.
   builder.createBlock(builder.getBlock()->getParent());
@@ -543,7 +543,7 @@ mlir::LogicalResult CIRGenFunction::emitLabel(const clang::LabelDecl &d) {
 }
 
 mlir::LogicalResult CIRGenFunction::emitBreakStmt(const clang::BreakStmt &s) {
-  builder.createBreak(getLoc(s.getBreakLoc()));
+  builder.createBreak(getLoc(s.getKwLoc()));
 
   // Insert the new block to continue codegen after the break statement.
   builder.createBlock(builder.getBlock()->getParent());


        


More information about the cfe-commits mailing list