mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-01 06:46:34 +00:00

Visual Studio's SAL extension uses a macro named __deallocate. This macro is used pervasively, and gets included through various different ways. This conflicts with the similarly named interfaces in libc++. Introduce a undef header similar to __undef_min_max to handle this. This fixes a number of errors due to the macro replacing the function name. llvm-svn: 229162
19 lines
648 B
C++
19 lines
648 B
C++
// -*- C++ -*-
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
// Source Licenses. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifdef __deallocate
|
|
#if defined(_MSC_VER) && !defined(__clang__)
|
|
_LIBCPP_WARNING("macro __deallocate is incompatible with C++. #undefining __deallocate")
|
|
#else
|
|
#warning: macro __deallocate is incompatible with C++. #undefining __deallocate
|
|
#endif
|
|
#undef __deallocate
|
|
#endif
|