[PATCH] D62731: Add support for options -frounding-math, ftrapping-math, -fp-model=, and -fp-exception-behavior=, : Specify floating point behavior

Melanie Blower via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 14:05:13 PDT 2019


mibintc marked an inline comment as done.
mibintc added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:133
+
+llvm::ConstrainedFPIntrinsic::ExceptionBehavior
+CodeGenFunction::ToConstrainedExceptMD(LangOptions::FPExceptionModeKind Kind) {
----------------
rjmccall wrote:
> mibintc wrote:
> > I added these 2 functions, is this what you have in mind or do you want me to write them differently?
> Slightly differently, yes, please.
> 
> ```
> static llvm::ConstrainedFPIntrinsic::ExceptionBehavior getConstrainedExceptionBehavior(LangOptions;:FPExceptionModeKind kind) {
>   switch (kind) {
>   case LangOptions::FPE_Ignore:
>     return llvm::ConstrainedFPIntrinsic::ebIgnore;
>   // ...rest of cases here...
>   // no default: should be exhaustive over the enum
>   }
>   llvm_unreachable("bad kind");
> }
> ```
sorry i missed that detail (static) the first time around


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62731/new/

https://reviews.llvm.org/D62731





More information about the llvm-commits mailing list