Skip to content

Commit e2fafec

Browse files
committed
[CIR] add definition for LongjmpOp
1 parent 4996bfe commit e2fafec

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

clang/include/clang/CIR/Dialect/IR/CIROps.td

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4768,6 +4768,24 @@ def CIR_EhSetjmpOp : CIR_Op<"eh.setjmp"> {
47684768
}];
47694769
}
47704770

4771+
def CIR_EhLongjmpOp : CIR_Op<"eh.longjmp"> {
4772+
let summary = "CIR longjmp operation";
4773+
let description = [{
4774+
Restore the environment (e.g., stack pointer, instruction pointer, signal mask, and other registers)
4775+
at the time of setjmp() call, by using the information saved in `env` by setjmp().
4776+
4777+
Examples:
4778+
```mlir
4779+
cir.eh.longjmp %arg0 : (!cir.ptr<!cir.void>) -> ()
4780+
```
4781+
}];
4782+
let arguments = (ins CIR_PointerType:$env);
4783+
4784+
let assemblyFormat = [{
4785+
$env `:` functional-type($env, results) attr-dict
4786+
}];
4787+
}
4788+
47714789
//===----------------------------------------------------------------------===//
47724790
// CopyOp
47734791
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)