src/share/vm/shark/llvmHeaders.hpp

changeset 0
f90c822e73f8
child 6876
710a3c8b516e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/vm/shark/llvmHeaders.hpp	Wed Apr 27 01:25:04 2016 +0800
     1.3 @@ -0,0 +1,123 @@
     1.4 +/*
     1.5 + * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright 2008, 2009, 2010 Red Hat, Inc.
     1.7 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8 + *
     1.9 + * This code is free software; you can redistribute it and/or modify it
    1.10 + * under the terms of the GNU General Public License version 2 only, as
    1.11 + * published by the Free Software Foundation.
    1.12 + *
    1.13 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.14 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.15 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.16 + * version 2 for more details (a copy is included in the LICENSE file that
    1.17 + * accompanied this code).
    1.18 + *
    1.19 + * You should have received a copy of the GNU General Public License version
    1.20 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.21 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.22 + *
    1.23 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.24 + * or visit www.oracle.com if you need additional information or have any
    1.25 + * questions.
    1.26 + *
    1.27 + */
    1.28 +
    1.29 +#ifndef SHARE_VM_SHARK_LLVMHEADERS_HPP
    1.30 +#define SHARE_VM_SHARK_LLVMHEADERS_HPP
    1.31 +
    1.32 +#ifdef assert
    1.33 +  #undef assert
    1.34 +#endif
    1.35 +
    1.36 +#ifdef DEBUG
    1.37 +  #define SHARK_DEBUG
    1.38 +  #undef DEBUG
    1.39 +#endif
    1.40 +
    1.41 +#include <llvm/Analysis/Verifier.h>
    1.42 +#include <llvm/ExecutionEngine/ExecutionEngine.h>
    1.43 +
    1.44 +// includes specific to each version
    1.45 +#if SHARK_LLVM_VERSION <= 31
    1.46 +#include <llvm/Support/IRBuilder.h>
    1.47 +#include <llvm/Type.h>
    1.48 +#include <llvm/Argument.h>
    1.49 +#include <llvm/Constants.h>
    1.50 +#include <llvm/DerivedTypes.h>
    1.51 +#include <llvm/Instructions.h>
    1.52 +#include <llvm/LLVMContext.h>
    1.53 +#include <llvm/Module.h>
    1.54 +#elif SHARK_LLVM_VERSION <= 32
    1.55 +#include <llvm/IRBuilder.h>
    1.56 +#include <llvm/Type.h>
    1.57 +#include <llvm/Argument.h>
    1.58 +#include <llvm/Constants.h>
    1.59 +#include <llvm/DerivedTypes.h>
    1.60 +#include <llvm/Instructions.h>
    1.61 +#include <llvm/LLVMContext.h>
    1.62 +#include <llvm/Module.h>
    1.63 +#else // SHARK_LLVM_VERSION <= 34
    1.64 +#include <llvm/IR/IRBuilder.h>
    1.65 +#include <llvm/IR/Argument.h>
    1.66 +#include <llvm/IR/Constants.h>
    1.67 +#include <llvm/IR/DerivedTypes.h>
    1.68 +#include <llvm/ExecutionEngine/ExecutionEngine.h>
    1.69 +#include <llvm/IR/Instructions.h>
    1.70 +#include <llvm/IR/LLVMContext.h>
    1.71 +#include <llvm/IR/Module.h>
    1.72 +#include <llvm/ADT/StringRef.h>
    1.73 +#include <llvm/IR/Type.h>
    1.74 +#endif
    1.75 +
    1.76 +// common includes
    1.77 +#include <llvm/Support/Threading.h>
    1.78 +#include <llvm/Support/TargetSelect.h>
    1.79 +#include <llvm/ExecutionEngine/JITMemoryManager.h>
    1.80 +#include <llvm/Support/CommandLine.h>
    1.81 +#include <llvm/ExecutionEngine/MCJIT.h>
    1.82 +#include <llvm/ExecutionEngine/JIT.h>
    1.83 +#include <llvm/ADT/StringMap.h>
    1.84 +#include <llvm/Support/Debug.h>
    1.85 +#include <llvm/Support/Host.h>
    1.86 +
    1.87 +#include <map>
    1.88 +
    1.89 +#ifdef assert
    1.90 +  #undef assert
    1.91 +#endif
    1.92 +
    1.93 +// from hotspot/src/share/vm/utilities/debug.hpp
    1.94 +#ifdef ASSERT
    1.95 +#ifndef USE_REPEATED_ASSERTS
    1.96 +#define assert(p, msg)                                                       \
    1.97 +do {                                                                         \
    1.98 +  if (!(p)) {                                                                \
    1.99 +    report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", msg);       \
   1.100 +    BREAKPOINT;                                                              \
   1.101 +  }                                                                          \
   1.102 +} while (0)
   1.103 +#else // #ifndef USE_REPEATED_ASSERTS
   1.104 +#define assert(p, msg)
   1.105 +do {                                                                         \
   1.106 +  for (int __i = 0; __i < AssertRepeat; __i++) {                             \
   1.107 +    if (!(p)) {                                                              \
   1.108 +      report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", msg);     \
   1.109 +      BREAKPOINT;                                                            \
   1.110 +    }                                                                        \
   1.111 +  }                                                                          \
   1.112 +} while (0)
   1.113 +#endif // #ifndef USE_REPEATED_ASSERTS
   1.114 +#else
   1.115 +  #define assert(p, msg)
   1.116 +#endif
   1.117 +
   1.118 +#ifdef DEBUG
   1.119 +  #undef DEBUG
   1.120 +#endif
   1.121 +#ifdef SHARK_DEBUG
   1.122 +  #define DEBUG
   1.123 +  #undef SHARK_DEBUG
   1.124 +#endif
   1.125 +
   1.126 +#endif // SHARE_VM_SHARK_LLVMHEADERS_HPP

mercurial