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