[llvm] r181938 - undef setjmp in PPCCTRLoops
Hal Finkel
hfinkel at anl.gov
Wed May 15 15:20:24 PDT 2013
Author: hfinkel
Date: Wed May 15 17:20:24 2013
New Revision: 181938
URL: http://llvm.org/viewvc/llvm-project?rev=181938&view=rev
Log:
undef setjmp in PPCCTRLoops
Trying to unbreak the VS build by copying some undef code from
Utils/LowerInvoke.cpp.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCCTRLoops.cpp
Modified: llvm/trunk/lib/Target/PowerPC/PPCCTRLoops.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCCTRLoops.cpp?rev=181938&r1=181937&r2=181938&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCCTRLoops.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCCTRLoops.cpp Wed May 15 17:20:24 2013
@@ -188,7 +188,23 @@ bool PPCCTRLoops::convertToCTRLoop(Loop
if (F->getIntrinsicID() != Intrinsic::not_intrinsic) {
switch (F->getIntrinsicID()) {
default: continue;
+
+// VisualStudio defines setjmp as _setjmp
+#if defined(_MSC_VER) && defined(setjmp) && \
+ !defined(setjmp_undefined_for_msvc)
+# pragma push_macro("setjmp")
+# undef setjmp
+# define setjmp_undefined_for_msvc
+#endif
+
case Intrinsic::setjmp:
+
+#if defined(_MSC_VER) && defined(setjmp_undefined_for_msvc)
+ // let's return it to _setjmp state
+# pragma pop_macro("setjmp")
+# undef setjmp_undefined_for_msvc
+#endif
+
case Intrinsic::longjmp:
case Intrinsic::memcpy:
case Intrinsic::memmove:
More information about the llvm-commits
mailing list