Mercurial > hg > release > icedtea6-1.6
changeset 1651:bf12ce0165c0
Fix shark build failure with llvm trunk
2009-08-04 Matthias Klose <doko@ubuntu.com>
* ports/hotspot/src/share/vm/shark/llvmValue.hpp: Adjust to rev 78061.
ConstantInt API moved back to the 2.5 API, ConstantFP partially moved
back to the 2.5 API.
author | doko@ubuntu.com |
---|---|
date | Tue, 04 Aug 2009 18:48:17 +0200 |
parents | e315bc774531 |
children | 1ef659f49812 |
files | ChangeLog ports/hotspot/src/share/vm/shark/llvmValue.hpp |
diffstat | 2 files changed, 13 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Aug 04 17:39:11 2009 +0100 +++ b/ChangeLog Tue Aug 04 18:48:17 2009 +0200 @@ -1,3 +1,9 @@ +2009-08-04 Matthias Klose <doko@ubuntu.com> + + * ports/hotspot/src/share/vm/shark/llvmValue.hpp: Adjust to rev 78061. + ConstantInt API moved back to the 2.5 API, ConstantFP partially moved + back to the 2.5 API. + 2009-08-04 Andrew John Hughes <ahughes@redhat.com> * rt/net/sourceforge/jnlp/DefaultLaunchHandler.java,
--- a/ports/hotspot/src/share/vm/shark/llvmValue.hpp Tue Aug 04 17:39:11 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/llvmValue.hpp Tue Aug 04 18:48:17 2009 +0200 @@ -27,50 +27,32 @@ public: static llvm::ConstantInt* jbyte_constant(jbyte value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(SharkType::jbyte_type(), value, true); -#else return llvm::ConstantInt::get(SharkType::jbyte_type(), value, true); -#endif } static llvm::ConstantInt* jint_constant(jint value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(SharkType::jint_type(), value, true); -#else return llvm::ConstantInt::get(SharkType::jint_type(), value, true); -#endif } static llvm::ConstantInt* jlong_constant(jlong value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(SharkType::jlong_type(), value, true); -#else return llvm::ConstantInt::get(SharkType::jlong_type(), value, true); -#endif } -#if SHARK_LLVM_VERSION >= 26 - static llvm::Constant* jfloat_constant(jfloat value) - { - return llvm::getGlobalContext().getConstantFP(SharkType::jfloat_type(), value); - } -#else static llvm::ConstantFP* jfloat_constant(jfloat value) { +#if SHARK_LLVM_VERSION >= 26 + return llvm::ConstantFP::get(llvm::getGlobalContext(), llvm::APFloat(value)); +#else return llvm::ConstantFP::get(SharkType::jfloat_type(), value); - } #endif -#if SHARK_LLVM_VERSION >= 26 - static llvm::Constant* jdouble_constant(jdouble value) - { - return llvm::getGlobalContext().getConstantFP(SharkType::jdouble_type(), value); } -#else static llvm::ConstantFP* jdouble_constant(jdouble value) { +#if SHARK_LLVM_VERSION >= 26 + return llvm::ConstantFP::get(llvm::getGlobalContext(), llvm::APFloat(value)); +#else return llvm::ConstantFP::get(SharkType::jdouble_type(), value); +#endif } -#endif static llvm::ConstantPointerNull* null() { return llvm::ConstantPointerNull::get(SharkType::jobject_type()); @@ -79,18 +61,10 @@ public: static llvm::ConstantInt* bit_constant(int value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(llvm::Type::Int1Ty, value, false); -#else return llvm::ConstantInt::get(llvm::Type::Int1Ty, value, false); -#endif } static llvm::ConstantInt* intptr_constant(intptr_t value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(SharkType::intptr_type(), value, false); -#else return llvm::ConstantInt::get(SharkType::intptr_type(), value, false); -#endif } };