gallium: implement ARB_texture_query_levels
[mesa.git] / src / gallium / auxiliary / gallivm / lp_bld_debug.cpp
index 5d6d45d61ecd0366bb1bcf076309242d1b9416a5..df26883196921ab6d7f6996446bbc9a10ab5cc06 100644 (file)
 
 #include <llvm/Support/Host.h>
 
+#if HAVE_LLVM >= 0x0303
+#include <llvm/IR/Module.h>
+#else
+#include <llvm/Module.h>
+#endif
+
 #include <llvm/MC/MCDisassembler.h>
 #include <llvm/MC/MCAsmInfo.h>
 #include <llvm/MC/MCInst.h>
@@ -111,6 +117,13 @@ raw_debug_ostream::write_impl(const char *Ptr, size_t Size)
 }
 
 
+extern "C" const char *
+lp_get_module_id(LLVMModuleRef module)
+{
+   return llvm::unwrap(module)->getModuleIdentifier().c_str();
+}
+
+
 /**
  * Same as LLVMDumpValue, but through our debugging channels.
  */