[SimplifyLibCalls] Define the value of the Euler number
This patch fixes the build break on Windows hosts.
There must be a better way of accessing the equivalent POSIX math constant
`M_E`.
llvm-svn: 373274
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
index b252167..3af754a 100644
--- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
@@ -1941,7 +1941,9 @@
ArgID == Intrinsic::exp || ArgID == Intrinsic::exp2) {
Constant *Eul;
if (ArgLb == ExpLb || ArgID == Intrinsic::exp)
- Eul = ConstantFP::get(Log->getType(), M_E);
+ // FIXME: The Euler number should be M_E, but it's place of definition
+ // is not quite standard.
+ Eul = ConstantFP::get(Log->getType(), 2.7182818284590452354);
else if (ArgLb == Exp2Lb || ArgID == Intrinsic::exp2)
Eul = ConstantFP::get(Log->getType(), 2.0);
else