Mercurial > hg > icedtea7
changeset 1914:d29fab296cd2
2009-07-08 Xerxes R?nby <xerxes@zafena.se>
* ports/hotspot/src/share/vm/shark/sharkBuilder.hpp
(SharkBuilder::pointer_constant): Pass the LLVMContext returned
from getGlobalContext() to the new GlobalVariable constructor
when llvm version are 2.6 or later to handle LLVM API change.
* ports/hotspot/src/share/vm/shark/sharkBuilder.cpp
(SharkBuilder::CreateDump): Likewise.
author | Xerxes R?nby <xerxes@zafena.se> |
---|---|
date | Wed, 08 Jul 2009 11:28:08 +0200 |
parents | 225f4d8d7962 |
children | 2a3a4c5b35e0 |
files | ChangeLog ports/hotspot/src/share/vm/shark/sharkBuilder.cpp ports/hotspot/src/share/vm/shark/sharkBuilder.hpp |
diffstat | 3 files changed, 23 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jul 07 10:58:02 2009 +0200 +++ b/ChangeLog Wed Jul 08 11:28:08 2009 +0200 @@ -1,3 +1,12 @@ +2009-07-08 Xerxes Rånby <xerxes@zafena.se> + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::pointer_constant): Pass the LLVMContext returned + from getGlobalContext() to the new GlobalVariable constructor + when llvm version are 2.6 or later to handle LLVM API change. + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp + (SharkBuilder::CreateDump): Likewise. + 2009-07-07 Xerxes Rånby <xerxes@zafena.se> * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp
--- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Tue Jul 07 10:58:02 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Wed Jul 08 11:28:08 2009 +0200 @@ -187,6 +187,12 @@ Value *name = CreatePtrToInt( CreateStructGEP( 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 const_name->getType(), true, GlobalValue::InternalLinkage, const_name, "dump", module()),
--- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Tue Jul 07 10:58:02 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Wed Jul 08 11:28:08 2009 +0200 @@ -174,7 +174,14 @@ char name[128]; snprintf(name, sizeof name - 1, "pointer_constant_%p", ptr); - GlobalVariable *value = new GlobalVariable(SharkType::intptr_type(), + 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));