mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Get rid of pop_macro warnings on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114750 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -148,19 +148,20 @@ bool LowerInvoke::doInitialization(Module &M) {
|
||||
"llvm.sjljeh.jblist");
|
||||
}
|
||||
|
||||
// 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
|
||||
// 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
|
||||
|
||||
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
|
||||
#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
|
||||
|
||||
LongJmpFn = Intrinsic::getDeclaration(&M, Intrinsic::longjmp);
|
||||
|
Reference in New Issue
Block a user