aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Utils/LowerInvoke.cpp
diff options
context:
space:
mode:
authorChuck Rose III <cfr@adobe.com>2008-04-15 21:27:11 +0000
committerChuck Rose III <cfr@adobe.com>2008-04-15 21:27:11 +0000
commit0ea0f317e391e1b8f3fc3ebcaf3b2df69f19b881 (patch)
tree8ce880fc6eb0bf315f3d17cb2d31ef20d4363255 /lib/Transforms/Utils/LowerInvoke.cpp
parente73e3ba8cc430fee638de7c72ee6658d30c71406 (diff)
downloadexternal_llvm-0ea0f317e391e1b8f3fc3ebcaf3b2df69f19b881.zip
external_llvm-0ea0f317e391e1b8f3fc3ebcaf3b2df69f19b881.tar.gz
external_llvm-0ea0f317e391e1b8f3fc3ebcaf3b2df69f19b881.tar.bz2
VisualStudio project files updated. #include <algorithm> added to make VisualStudio happy. Also had to undefine setjmp because of #include <csetjmp> turning setjmp into _setjmp in VisualStudio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49743 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerInvoke.cpp')
-rw-r--r--lib/Transforms/Utils/LowerInvoke.cpp15
1 files changed, 15 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);
}