gallivm: Fix build with latest LLVM

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
Jan Vesely 2014-08-04 18:50:02 -04:00 committed by Michel Dänzer
parent 6b834af77e
commit e28136343b

View file

@ -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