src/share/vm/shark/llvmHeaders.hpp

Print this page


   1 /*
   2  * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
   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 



  26 #ifdef assert
  27   #undef assert
  28 #endif
  29 
  30 #ifdef DEBUG
  31   #define SHARK_DEBUG
  32   #undef DEBUG
  33 #endif
  34 
  35 #include <llvm/Argument.h>
  36 #include <llvm/Constants.h>
  37 #include <llvm/DerivedTypes.h>
  38 #include <llvm/ExecutionEngine/ExecutionEngine.h>
  39 #include <llvm/Instructions.h>
  40 #include <llvm/LLVMContext.h>
  41 #include <llvm/Module.h>
  42 #if SHARK_LLVM_VERSION < 27
  43 #include <llvm/ModuleProvider.h>
  44 #endif
  45 #include <llvm/Support/IRBuilder.h>


  76 do {                                                                         \
  77   for (int __i = 0; __i < AssertRepeat; __i++) {                             \
  78     if (!(p)) {                                                              \
  79       report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", msg);     \
  80       BREAKPOINT;                                                            \
  81     }                                                                        \
  82   }                                                                          \
  83 } while (0)
  84 #endif // #ifndef USE_REPEATED_ASSERTS
  85 #else
  86   #define assert(p, msg)
  87 #endif
  88 
  89 #ifdef DEBUG
  90   #undef DEBUG
  91 #endif
  92 #ifdef SHARK_DEBUG
  93   #define DEBUG
  94   #undef SHARK_DEBUG
  95 #endif


   1 /*
   2  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
   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 
  26 #ifndef SHARE_VM_SHARK_LLVMHEADERS_HPP
  27 #define SHARE_VM_SHARK_LLVMHEADERS_HPP
  28 
  29 #ifdef assert
  30   #undef assert
  31 #endif
  32 
  33 #ifdef DEBUG
  34   #define SHARK_DEBUG
  35   #undef DEBUG
  36 #endif
  37 
  38 #include <llvm/Argument.h>
  39 #include <llvm/Constants.h>
  40 #include <llvm/DerivedTypes.h>
  41 #include <llvm/ExecutionEngine/ExecutionEngine.h>
  42 #include <llvm/Instructions.h>
  43 #include <llvm/LLVMContext.h>
  44 #include <llvm/Module.h>
  45 #if SHARK_LLVM_VERSION < 27
  46 #include <llvm/ModuleProvider.h>
  47 #endif
  48 #include <llvm/Support/IRBuilder.h>


  79 do {                                                                         \
  80   for (int __i = 0; __i < AssertRepeat; __i++) {                             \
  81     if (!(p)) {                                                              \
  82       report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", msg);     \
  83       BREAKPOINT;                                                            \
  84     }                                                                        \
  85   }                                                                          \
  86 } while (0)
  87 #endif // #ifndef USE_REPEATED_ASSERTS
  88 #else
  89   #define assert(p, msg)
  90 #endif
  91 
  92 #ifdef DEBUG
  93   #undef DEBUG
  94 #endif
  95 #ifdef SHARK_DEBUG
  96   #define DEBUG
  97   #undef SHARK_DEBUG
  98 #endif
  99 
 100 #endif // SHARE_VM_SHARK_LLVMHEADERS_HPP