ac: fix build with recent LLVM

Build is broken since "Move CodeGenFileType enum to Support/CodeGen.h".

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
This commit is contained in:
Samuel Pitoiset 2019-11-14 10:04:29 +01:00
parent 94cb4916e3
commit ee9811a0bb

View file

@ -192,7 +192,11 @@ struct ac_compiler_passes *ac_create_llvm_passes(LLVMTargetMachineRef tm)
if (TM->addPassesToEmitFile(p->passmgr, p->ostream,
nullptr,
#if LLVM_VERSION_MAJOR >= 10
llvm::CGFT_ObjectFile)) {
#else
llvm::TargetMachine::CGFT_ObjectFile)) {
#endif
fprintf(stderr, "amd: TargetMachine can't emit a file of this type!\n");
delete p;
return NULL;