gallivm: Add ifdefs so raw_debug_stream is only defined when used
authorTom Stellard <thomas.stellard@amd.com>
Mon, 20 Jul 2015 15:24:13 +0000 (11:24 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Thu, 23 Jul 2015 14:13:03 +0000 (14:13 +0000)
Its only use is to implement a custom version of LLVMDumpValue
on some Windows and embedded platforms.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp

index ec88f3308784adeca29004ded1fd5413a9d9c3ea..0a5c2ccdae39405d2ebcf16e5669dc00eef493e7 100644 (file)
@@ -61,6 +61,7 @@ lp_check_alignment(const void *ptr, unsigned alignment)
    return ((uintptr_t)ptr & (alignment - 1)) == 0;
 }
 
+#if (defined(PIPE_OS_WINDOWS) && !defined(PIPE_CC_MSVC)) || defined(PIPE_OS_EMBEDDED)
 
 class raw_debug_ostream :
    public llvm::raw_ostream
@@ -91,6 +92,7 @@ raw_debug_ostream::write_impl(const char *Ptr, size_t Size)
    }
 }
 
+#endif
 
 extern "C" const char *
 lp_get_module_id(LLVMModuleRef module)