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