setTargetTriple now accepts Triple rather than string
This commit is contained in:
parent
b74da9613a
commit
4e4bed8684
1 changed files with 4 additions and 0 deletions
|
@ -153,7 +153,11 @@ extern "C" LLVMContextRef LLVMRustContextCreate(bool shouldDiscardNames) {
|
|||
|
||||
extern "C" void LLVMRustSetNormalizedTarget(LLVMModuleRef M,
|
||||
const char *Triple) {
|
||||
#if LLVM_VERSION_GE(21, 0)
|
||||
unwrap(M)->setTargetTriple(llvm::Triple(Triple::normalize(Triple)));
|
||||
#else
|
||||
unwrap(M)->setTargetTriple(Triple::normalize(Triple));
|
||||
#endif
|
||||
}
|
||||
|
||||
extern "C" void LLVMRustPrintPassTimings(RustStringRef OutBuf) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue