================
@@ -956,6 +957,22 @@ LValue
CIRGenFunction::makeNaturalAlignAddrLValue(mlir::Value val,
return makeAddrLValue(addr, ty, baseInfo);
}
+// Map the LangOption for exception behavior into the corresponding enum in
+// the IR.
+static cir::fp::ExceptionBehavior
+toConstrainedExceptMd(LangOptions::FPExceptionModeKind kind) {
+ switch (kind) {
+ case LangOptions::FPE_Ignore:
+ return cir::fp::ebIgnore;
+ case LangOptions::FPE_MayTrap:
+ return cir::fp::ebMayTrap;
+ case LangOptions::FPE_Strict:
+ return cir::fp::ebStrict;
+ default:
+ llvm_unreachable("Unsupported FP Exception Behavior");
----------------
HendrikHuebner wrote:
```suggestion
cgm.errorNYI(...)
```
https://github.com/llvm/llvm-project/pull/179121
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits