[PATCH] D39481: [CodeGen] fix const-ness of builtin equivalents of <math.h> and <complex.h> functions that might set errno

Sanjay Patel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 2 12:02:14 PDT 2017


spatel updated this revision to Diff 121344.
spatel added a comment.

Patch updated:
Make const-ness of the builtins match const-ness of their lib function siblings. We're deferring fixing some of these that are obviously wrong to follow-up patches. Hopefully, the bugs are visible in the new test file (added at https://reviews.llvm.org/rL317220).

These are the differences I noted from the previous rev of the patch:
ceil, floor, rint, round, and everything in complex are left as constant regardless of errno.
lgamma is not constant regardless of errno.


https://reviews.llvm.org/D39481

Files:
  include/clang/Basic/Builtins.def
  test/CodeGen/builtin-errno.c
  test/CodeGen/builtin-sqrt.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39481.121344.patch
Type: text/x-patch
Size: 42008 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171102/e37fee66/attachment-0001.bin>


More information about the cfe-commits mailing list