mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 02:20:11 +01:00
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:
parent
1f93dd7d37
commit
0e7c94b2b3
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue