twisti@2047: /* twisti@2765: * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. twisti@2047: * Copyright 2008, 2009, 2010 Red Hat, Inc. twisti@2047: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. twisti@2047: * twisti@2047: * This code is free software; you can redistribute it and/or modify it twisti@2047: * under the terms of the GNU General Public License version 2 only, as twisti@2047: * published by the Free Software Foundation. twisti@2047: * twisti@2047: * This code is distributed in the hope that it will be useful, but WITHOUT twisti@2047: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or twisti@2047: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License twisti@2047: * version 2 for more details (a copy is included in the LICENSE file that twisti@2047: * accompanied this code). twisti@2047: * twisti@2047: * You should have received a copy of the GNU General Public License version twisti@2047: * 2 along with this work; if not, write to the Free Software Foundation, twisti@2047: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. twisti@2047: * twisti@2047: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA twisti@2047: * or visit www.oracle.com if you need additional information or have any twisti@2047: * questions. twisti@2047: * twisti@2047: */ twisti@2047: stefank@2314: #ifndef SHARE_VM_SHARK_LLVMHEADERS_HPP stefank@2314: #define SHARE_VM_SHARK_LLVMHEADERS_HPP stefank@2314: twisti@2047: #ifdef assert twisti@2047: #undef assert twisti@2047: #endif twisti@2047: twisti@2047: #ifdef DEBUG twisti@2047: #define SHARK_DEBUG twisti@2047: #undef DEBUG twisti@2047: #endif twisti@2047: twisti@4314: #include twisti@2047: #include twisti@2047: #include twisti@2047: #include twisti@2047: #include twisti@2047: #include twisti@2047: #include twisti@2047: #include twisti@4314: #if SHARK_LLVM_VERSION <= 31 twisti@4314: #include twisti@4314: #else twisti@4314: #include twisti@2047: #endif twisti@2765: #include twisti@4314: #include twisti@2047: #include twisti@2047: #include twisti@2047: #include twisti@4314: #include twisti@2047: #include twisti@2047: #include twisti@2047: #include twisti@2765: #include twisti@2047: twisti@2047: #include twisti@2047: twisti@2047: #ifdef assert twisti@2047: #undef assert twisti@2047: #endif twisti@2047: twisti@2047: // from hotspot/src/share/vm/utilities/debug.hpp twisti@2047: #ifdef ASSERT twisti@2047: #ifndef USE_REPEATED_ASSERTS twisti@2047: #define assert(p, msg) \ twisti@2047: do { \ twisti@2047: if (!(p)) { \ twisti@2047: report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", msg); \ twisti@2047: BREAKPOINT; \ twisti@2047: } \ twisti@2047: } while (0) twisti@2047: #else // #ifndef USE_REPEATED_ASSERTS twisti@2047: #define assert(p, msg) twisti@2047: do { \ twisti@2047: for (int __i = 0; __i < AssertRepeat; __i++) { \ twisti@2047: if (!(p)) { \ twisti@2047: report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", msg); \ twisti@2047: BREAKPOINT; \ twisti@2047: } \ twisti@2047: } \ twisti@2047: } while (0) twisti@2047: #endif // #ifndef USE_REPEATED_ASSERTS twisti@2047: #else twisti@2047: #define assert(p, msg) twisti@2047: #endif twisti@2047: twisti@2047: #ifdef DEBUG twisti@2047: #undef DEBUG twisti@2047: #endif twisti@2047: #ifdef SHARK_DEBUG twisti@2047: #define DEBUG twisti@2047: #undef SHARK_DEBUG twisti@2047: #endif stefank@2314: stefank@2314: #endif // SHARE_VM_SHARK_LLVMHEADERS_HPP