aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/StackMaps.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-03-19 22:39:51 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-03-19 22:39:51 +0000
commitc66deafb73e6c426db2dba44864183b8e44cd4c2 (patch)
treea7024ce5413eeba27e0b4e24489a5c4f8d3c9334 /llvm/lib/CodeGen/StackMaps.cpp
parentcf7b5f5fc57d5e9cf2e1f20f2e9d7b99cb6b6759 (diff)
downloadllvm-c66deafb73e6c426db2dba44864183b8e44cd4c2.zip
llvm-c66deafb73e6c426db2dba44864183b8e44cd4c2.tar.gz
llvm-c66deafb73e6c426db2dba44864183b8e44cd4c2.tar.bz2
[Modules] Implement __builtin_isinf_sign in Clang.
Somehow, we never managed to implement this fully. We could constant fold it like crazy, including constant folding complex arguments, etc. But if you actually needed to generate code for it, error. I've implemented it using the somewhat obvious lowering. Happy for suggestions on a more clever way to lower this. Now, what you might ask does this have to do with modules? Fun story. So it turns out that libstdc++ actually uses __builtin_isinf_sign to implement std::isinf when in C++98 mode, but only inside of a template. So if we're lucky, and we never instantiate that, everything is good. But once we try to instantiate that template function, we need this builtin. All of my customers at least are using C++11 and so they never hit this code path. But what does that have to do with modules? Fun story. So it turns out that with modules we actually observe a bunch of bugs in libstdc++ where their <cmath> header clobbers things exposed by <math.h>. To fix these, we have to provide global function definitions to replace the macros that C99 would have used. And it turns out that ::isinf needs to be implemented using the exact semantics used by the C++98 variant of std::isinf. And so I started to fix this bug in libstdc++ and ceased to be able to compile libstdc++ with Clang. The yaks are legion. llvm-svn: 232778
Diffstat (limited to 'llvm/lib/CodeGen/StackMaps.cpp')
0 files changed, 0 insertions, 0 deletions