[clang] [CIR] Upstream GotoOp (PR #153701)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 14 19:09:25 PDT 2025
================
@@ -433,6 +435,25 @@ mlir::LogicalResult CIRGenFunction::emitReturnStmt(const ReturnStmt &s) {
return mlir::success();
}
+mlir::LogicalResult CIRGenFunction::emitGotoStmt(const clang::GotoStmt &s) {
+ // FIXME: LLVM codegen inserts emit stop point here for debug info
+ // sake when the insertion point is available, but doesn't do
+ // anything special when there isn't. We haven't implemented debug
+ // info support just yet, look at this again once we have it.
+ if (!builder.getInsertionBlock())
+ cgm.errorNYI(s.getSourceRange(), "NYI");
+
+ builder.create<cir::GotoOp>(getLoc(s.getSourceRange()),
----------------
Andres-Salamanca wrote:
Maybe something like:
```perl
perl -pi -e 's/builder\.create<\s*cir::(\w+)\s*>\s*\(/cir::$1::create(builder, /g'
```
https://github.com/llvm/llvm-project/pull/153701
More information about the cfe-commits
mailing list