ac/llvm: Don't use getTriple() on LLVM21+
setTargetTriple() takes a Triple now. Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33981>
This commit is contained in:
@@ -97,7 +97,11 @@ LLVMModuleRef ac_create_module(LLVMTargetMachineRef tm, LLVMContextRef ctx)
|
||||
TargetMachine *TM = reinterpret_cast<TargetMachine *>(tm);
|
||||
LLVMModuleRef module = LLVMModuleCreateWithNameInContext("mesa-shader", ctx);
|
||||
|
||||
#if LLVM_VERSION_MAJOR >= 21
|
||||
unwrap(module)->setTargetTriple(TM->getTargetTriple());
|
||||
#else
|
||||
unwrap(module)->setTargetTriple(TM->getTargetTriple().getTriple());
|
||||
#endif
|
||||
unwrap(module)->setDataLayout(TM->createDataLayout());
|
||||
return module;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user