Mesa (master): gallivm: Fix build with latest LLVM
Michel Dänzer
daenzer at kemper.freedesktop.org
Tue Aug 5 03:56:54 UTC 2014
Module: Mesa
Branch: master
Commit: e28136343b6aa7dfff8ec85f6463574d6625b5a6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e28136343b6aa7dfff8ec85f6463574d6625b5a6
Author: Jan Vesely <jan.vesely at rutgers.edu>
Date: Mon Aug 4 18:50:02 2014 -0400
gallivm: Fix build with latest LLVM
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer at amd.com>
---
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 413a0c2..b6b52c8 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -34,6 +34,10 @@
#include <llvm/Support/Format.h>
#include <llvm/Support/MemoryObject.h>
+#if HAVE_LLVM >= 0x0306
+#include <llvm/Target/TargetSubtargetInfo.h>
+#endif
+
#include <llvm/Support/TargetRegistry.h>
#include <llvm/MC/MCSubtargetInfo.h>
@@ -271,7 +275,11 @@ disassemble(const void* func, llvm::raw_ostream & Out)
#endif
OwningPtr<TargetMachine> TM(T->createTargetMachine(Triple, sys::getHostCPUName(), "", options));
+#if HAVE_LLVM >= 0x0306
+ const TargetInstrInfo *TII = TM->getSubtargetImpl()->getInstrInfo();
+#else
const TargetInstrInfo *TII = TM->getInstrInfo();
+#endif
/*
* Wrap the data in a MemoryObject
More information about the mesa-commit
mailing list