diff options
author | Hal Finkel <hfinkel@anl.gov> | 2013-05-15 22:20:24 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2013-05-15 22:20:24 +0000 |
commit | f1e7ea43aa3b511ea9750c7a1f721d1c683e31b2 (patch) | |
tree | 617d30408f0fe7faa1cdaa7a011e24144483cc7d /lib/Target | |
parent | 17585dc4d437d0c72f97f9b1aa86218f6b66a677 (diff) | |
download | external_llvm-f1e7ea43aa3b511ea9750c7a1f721d1c683e31b2.zip external_llvm-f1e7ea43aa3b511ea9750c7a1f721d1c683e31b2.tar.gz external_llvm-f1e7ea43aa3b511ea9750c7a1f721d1c683e31b2.tar.bz2 |
undef setjmp in PPCCTRLoops
Trying to unbreak the VS build by copying some undef code from
Utils/LowerInvoke.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/PowerPC/PPCCTRLoops.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCCTRLoops.cpp b/lib/Target/PowerPC/PPCCTRLoops.cpp index bb969a6..ae5d918 100644 --- a/lib/Target/PowerPC/PPCCTRLoops.cpp +++ b/lib/Target/PowerPC/PPCCTRLoops.cpp @@ -188,7 +188,23 @@ bool PPCCTRLoops::convertToCTRLoop(Loop *L) { 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: |