Index: include/clang/Basic/Builtins.def =================================================================== --- include/clang/Basic/Builtins.def +++ include/clang/Basic/Builtins.def @@ -916,6 +916,13 @@ LIBBUILTIN(fabsf, "ff", "fnc", "math.h", ALL_LANGUAGES) LIBBUILTIN(fabsl, "LdLd", "fnc", "math.h", ALL_LANGUAGES) +LIBBUILTIN(finite, "id", "fnc", "math.h", ALL_LANGUAGES) +LIBBUILTIN(__finite, "id", "fnc", "math.h", ALL_LANGUAGES) +LIBBUILTIN(finitef, "if", "fnc", "math.h", ALL_LANGUAGES) +LIBBUILTIN(__finitef, "if", "fnc", "math.h", ALL_LANGUAGES) +LIBBUILTIN(finitel, "iLd", "fnc", "math.h", ALL_LANGUAGES) +LIBBUILTIN(__finitel, "iLd", "fnc", "math.h", ALL_LANGUAGES) + LIBBUILTIN(fmod, "ddd", "fne", "math.h", ALL_LANGUAGES) LIBBUILTIN(fmodf, "fff", "fne", "math.h", ALL_LANGUAGES) LIBBUILTIN(fmodl, "LdLdLd", "fne", "math.h", ALL_LANGUAGES) Index: lib/CodeGen/CGBuiltin.cpp =================================================================== --- lib/CodeGen/CGBuiltin.cpp +++ lib/CodeGen/CGBuiltin.cpp @@ -903,6 +903,12 @@ return RValue::get(Builder.CreateZExt(V, ConvertType(E->getType()))); } + case Builtin::BIfinite: + case Builtin::BI__finite: + case Builtin::BIfinitef: + case Builtin::BI__finitef: + case Builtin::BIfinitel: + case Builtin::BI__finitel: case Builtin::BI__builtin_isinf: case Builtin::BI__builtin_isfinite: { // isinf(x) --> fabs(x) == infinity