src/share/vm/shark/llvmHeaders.hpp

Thu, 14 Apr 2011 01:53:12 -0700

author
twisti
date
Thu, 14 Apr 2011 01:53:12 -0700
changeset 2765
1fcd6e9c3965
parent 2314
f95d63e2154a
child 4314
2cd5e15048e6
permissions
-rw-r--r--

7036220: Shark fails to find LLVM 2.9 System headers during build
Reviewed-by: gbenson, twisti
Contributed-by: Xerxes Ranby <xerxes@zafena.se>

twisti@2047 1 /*
twisti@2765 2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
twisti@2047 3 * Copyright 2008, 2009, 2010 Red Hat, Inc.
twisti@2047 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
twisti@2047 5 *
twisti@2047 6 * This code is free software; you can redistribute it and/or modify it
twisti@2047 7 * under the terms of the GNU General Public License version 2 only, as
twisti@2047 8 * published by the Free Software Foundation.
twisti@2047 9 *
twisti@2047 10 * This code is distributed in the hope that it will be useful, but WITHOUT
twisti@2047 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
twisti@2047 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
twisti@2047 13 * version 2 for more details (a copy is included in the LICENSE file that
twisti@2047 14 * accompanied this code).
twisti@2047 15 *
twisti@2047 16 * You should have received a copy of the GNU General Public License version
twisti@2047 17 * 2 along with this work; if not, write to the Free Software Foundation,
twisti@2047 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
twisti@2047 19 *
twisti@2047 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
twisti@2047 21 * or visit www.oracle.com if you need additional information or have any
twisti@2047 22 * questions.
twisti@2047 23 *
twisti@2047 24 */
twisti@2047 25
stefank@2314 26 #ifndef SHARE_VM_SHARK_LLVMHEADERS_HPP
stefank@2314 27 #define SHARE_VM_SHARK_LLVMHEADERS_HPP
stefank@2314 28
twisti@2047 29 #ifdef assert
twisti@2047 30 #undef assert
twisti@2047 31 #endif
twisti@2047 32
twisti@2047 33 #ifdef DEBUG
twisti@2047 34 #define SHARK_DEBUG
twisti@2047 35 #undef DEBUG
twisti@2047 36 #endif
twisti@2047 37
twisti@2047 38 #include <llvm/Argument.h>
twisti@2047 39 #include <llvm/Constants.h>
twisti@2047 40 #include <llvm/DerivedTypes.h>
twisti@2047 41 #include <llvm/ExecutionEngine/ExecutionEngine.h>
twisti@2047 42 #include <llvm/Instructions.h>
twisti@2047 43 #include <llvm/LLVMContext.h>
twisti@2047 44 #include <llvm/Module.h>
twisti@2047 45 #if SHARK_LLVM_VERSION < 27
twisti@2047 46 #include <llvm/ModuleProvider.h>
twisti@2047 47 #endif
twisti@2047 48 #include <llvm/Support/IRBuilder.h>
twisti@2765 49 #if SHARK_LLVM_VERSION >= 29
twisti@2765 50 #include <llvm/Support/Threading.h>
twisti@2765 51 #else
twisti@2047 52 #include <llvm/System/Threading.h>
twisti@2765 53 #endif
twisti@2047 54 #include <llvm/Target/TargetSelect.h>
twisti@2047 55 #include <llvm/Type.h>
twisti@2047 56 #include <llvm/ExecutionEngine/JITMemoryManager.h>
twisti@2047 57 #include <llvm/Support/CommandLine.h>
twisti@2047 58 #if SHARK_LLVM_VERSION >= 27
twisti@2047 59 #include <llvm/ExecutionEngine/JIT.h>
twisti@2047 60 #include <llvm/ADT/StringMap.h>
twisti@2047 61 #include <llvm/Support/Debug.h>
twisti@2765 62 #if SHARK_LLVM_VERSION >= 29
twisti@2765 63 #include <llvm/Support/Host.h>
twisti@2765 64 #else
twisti@2047 65 #include <llvm/System/Host.h>
twisti@2047 66 #endif
twisti@2765 67 #endif
twisti@2047 68
twisti@2047 69 #include <map>
twisti@2047 70
twisti@2047 71 #ifdef assert
twisti@2047 72 #undef assert
twisti@2047 73 #endif
twisti@2047 74
twisti@2047 75 // from hotspot/src/share/vm/utilities/debug.hpp
twisti@2047 76 #ifdef ASSERT
twisti@2047 77 #ifndef USE_REPEATED_ASSERTS
twisti@2047 78 #define assert(p, msg) \
twisti@2047 79 do { \
twisti@2047 80 if (!(p)) { \
twisti@2047 81 report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", msg); \
twisti@2047 82 BREAKPOINT; \
twisti@2047 83 } \
twisti@2047 84 } while (0)
twisti@2047 85 #else // #ifndef USE_REPEATED_ASSERTS
twisti@2047 86 #define assert(p, msg)
twisti@2047 87 do { \
twisti@2047 88 for (int __i = 0; __i < AssertRepeat; __i++) { \
twisti@2047 89 if (!(p)) { \
twisti@2047 90 report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", msg); \
twisti@2047 91 BREAKPOINT; \
twisti@2047 92 } \
twisti@2047 93 } \
twisti@2047 94 } while (0)
twisti@2047 95 #endif // #ifndef USE_REPEATED_ASSERTS
twisti@2047 96 #else
twisti@2047 97 #define assert(p, msg)
twisti@2047 98 #endif
twisti@2047 99
twisti@2047 100 #ifdef DEBUG
twisti@2047 101 #undef DEBUG
twisti@2047 102 #endif
twisti@2047 103 #ifdef SHARK_DEBUG
twisti@2047 104 #define DEBUG
twisti@2047 105 #undef SHARK_DEBUG
twisti@2047 106 #endif
stefank@2314 107
stefank@2314 108 #endif // SHARE_VM_SHARK_LLVMHEADERS_HPP

mercurial