diff options
-rw-r--r-- | lib/Transforms/Utils/LowerInvoke.cpp | 15 | ||||
-rw-r--r-- | utils/TableGen/RegisterInfoEmitter.cpp | 1 | ||||
-rw-r--r-- | win32/Transforms/Transforms.vcproj | 4 |
3 files changed, 20 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index 884f4fc..3d356b7 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -143,7 +143,22 @@ bool LowerInvoke::doInitialization(Module &M) { Constant::getNullValue(PtrJBList), "llvm.sjljeh.jblist", &M); } + +// VisualStudio defines setjmp as _setjmp via #include <csetjmp> / <setjmp.h>, +// so it looks like Intrinsic::_setjmp +#if defined(_MSC_VER) && defined(setjmp) +#define setjmp_undefined_for_visual_studio +#undef setjmp +#endif + SetJmpFn = Intrinsic::getDeclaration(&M, Intrinsic::setjmp); + +#if defined(_MSC_VER) && defined(setjmp_undefined_for_visual_studio) +// let's return it to _setjmp state in case anyone ever needs it after this +// point under VisualStudio +#define setjmp _setjmp +#endif + LongJmpFn = Intrinsic::getDeclaration(&M, Intrinsic::longjmp); } diff --git a/utils/TableGen/RegisterInfoEmitter.cpp b/utils/TableGen/RegisterInfoEmitter.cpp index ce95390..b9253cf 100644 --- a/utils/TableGen/RegisterInfoEmitter.cpp +++ b/utils/TableGen/RegisterInfoEmitter.cpp @@ -21,6 +21,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Streams.h" #include <set> +#include <algorithm> using namespace llvm; // runEnums - Print out enum values for all of the registers. diff --git a/win32/Transforms/Transforms.vcproj b/win32/Transforms/Transforms.vcproj index 2decde3..56de59e 100644 --- a/win32/Transforms/Transforms.vcproj +++ b/win32/Transforms/Transforms.vcproj @@ -488,6 +488,10 @@ > </File> <File + RelativePath="..\..\lib\Transforms\Scalar\MemCpyOptimizer.cpp" + > + </File> + <File RelativePath="..\..\lib\Transforms\Scalar\PredicateSimplifier.cpp" > </File> |