From d5a6c172547d8964f4d4bb79637651decaf9deee Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 8 Feb 2012 21:45:27 -0800 Subject: [PATCH] gallivm: Change getExtent and readByte to non-const with llvm-3.1. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix build with llvm-3.1svn. llvm-3.1svn r149918 changed BufferMemoryObject::getExtent and BufferMemoryObject::readByte from const member functions to non-const member functions in include/llvm/Support/MemoryObject.h. Signed-off-by: Vinson Lee Reviewed-by: José Fonseca --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp index be8d7884bca..5d98763d802 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp @@ -146,12 +146,20 @@ public: return 0; } +#if HAVE_LLVM >= 0x0301 + uint64_t getExtent() +#else uint64_t getExtent() const +#endif { return Length; } +#if HAVE_LLVM >= 0x0301 + int readByte(uint64_t addr, uint8_t *byte) +#else int readByte(uint64_t addr, uint8_t *byte) const +#endif { if (addr > getExtent()) return -1; -- 2.30.2