diff options
author | Christian König <[email protected]> | 2011-03-19 01:02:40 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2011-03-19 01:02:40 +0100 |
commit | 2bf95c519e755146704f4942b1703d47d18bfeaa (patch) | |
tree | 9d29c5d56014377013770615611f903cd5b25292 /src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | |
parent | f36846c77ee196881c0da560229279fc7ed88170 (diff) | |
parent | 8042d751debb7a8375e8bc587189fea9a5a8371d (diff) |
Merge remote branch 'origin/master' into pipe-video
Conflicts:
src/gallium/drivers/r600/r600_asm.c
src/gallium/tests/unit/SConscript
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_misc.cpp')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 46dd00d8224..843a14a500c 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -46,66 +46,6 @@ #include "util/u_debug.h" -#if (defined(PIPE_OS_WINDOWS) && !defined(PIPE_CC_MSVC)) || defined(PIPE_OS_EMBDDED) - -#include "llvm/Support/raw_ostream.h" - -class raw_debug_ostream : - public llvm::raw_ostream -{ - uint64_t pos; - - void write_impl(const char *Ptr, size_t Size); - uint64_t current_pos() { return pos; } - uint64_t current_pos() const { return pos; } - -#if HAVE_LLVM >= 0x207 - uint64_t preferred_buffer_size() { return 512; } -#else - size_t preferred_buffer_size() { return 512; } -#endif -}; - - -void -raw_debug_ostream::write_impl(const char *Ptr, size_t Size) -{ - if (Size > 0) { - char *lastPtr = (char *)&Ptr[Size]; - char last = *lastPtr; - *lastPtr = 0; - _debug_printf("%*s", Size, Ptr); - *lastPtr = last; - pos += Size; - } -} - - -/** - * Same as LLVMDumpValue, but through our debugging channels. - */ -extern "C" void -lp_debug_dump_value(LLVMValueRef value) -{ - raw_debug_ostream os; - llvm::unwrap(value)->print(os); - os.flush(); -} - - -#else - - -extern "C" void -lp_debug_dump_value(LLVMValueRef value) -{ - LLVMDumpValue(value); -} - - -#endif - - /** * Register the engine with oprofile. * |