Mercurial > hg > release > icedtea6-1.6
changeset 1642:d20bab985f89
2009-07-17 Gary Benson <gbenson@redhat.com>
* ports/hotspot/src/share/vm/shark/sharkBuilder.hpp
(SharkBuilder::pointer_constant): Conditionalize a hack.
author | Gary Benson <gbenson@redhat.com> |
---|---|
date | Fri, 17 Jul 2009 06:04:59 -0400 |
parents | ea9d66cbd06d |
children | 4ec5e065fb53 |
files | ChangeLog ports/hotspot/src/share/vm/shark/sharkBuilder.hpp |
diffstat | 2 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Jul 16 15:34:14 2009 +0200 +++ b/ChangeLog Fri Jul 17 06:04:59 2009 -0400 @@ -1,3 +1,8 @@ +2009-07-17 Gary Benson <gbenson@redhat.com> + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::pointer_constant): Conditionalize a hack. + 2009-07-16 Matthias Klose <doko@ubuntu.com> * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp (native_entry):
--- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Thu Jul 16 15:34:14 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Fri Jul 17 06:04:59 2009 -0400 @@ -156,6 +156,9 @@ llvm::Constant* pointer_constant(const void *ptr) { +#if SHARK_LLVM_VERSION >= 25 || !defined(AMD64) + return LLVMValue::intptr_constant((intptr_t) ptr); +#else // Create a pointer constant that points at PTR. We do this by // creating a GlobalVariable mapped at PTR. This is a workaround // for http://www.llvm.org/bugs/show_bug.cgi?id=2920 @@ -175,18 +178,13 @@ snprintf(name, sizeof name - 1, "pointer_constant_%p", ptr); GlobalVariable *value = new GlobalVariable( -#if SHARK_LLVM_VERSION >= 26 - // LLVM 2.6 requires a LLVMContext during GlobalVariable construction. - // getGlobalConext() returns one that can be used as long as the shark - // compiler are single-threaded. - getGlobalContext(), -#endif SharkType::intptr_type(), false, GlobalValue::ExternalLinkage, NULL, name, module()); execution_engine()->addGlobalMapping(value, const_cast<void*>(ptr)); return ConstantExpr::getPtrToInt(value, SharkType::intptr_type()); +#endif // SHARK_LLVM_VERSION >= 25 || !AMD64 } // Helper for making pointers