[Mesa-dev] [PATCH] gallivm: Update TargetInstrInfo retrieval for LLVM 3.6
Michel Dänzer
michel at daenzer.net
Mon Aug 4 20:22:02 PDT 2014
From: Michel Dänzer <michel.daenzer at amd.com>
Fixes build failure since LLVM SVN r214781.
Signed-off-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..6a0cdda 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -61,6 +61,10 @@
#include <llvm/MC/MCContext.h>
#endif
+#if HAVE_LLVM >= 0x0306
+#include <llvm/Target/TargetSubtargetInfo.h>
+#endif
+
#include "util/u_math.h"
#include "util/u_debug.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
--
2.0.1
More information about the mesa-dev
mailing list