提交 37cc63ab 编写于 作者: K kennytm 提交者: GitHub

Rollup merge of #46691 - varkor:contrib-3, r=rkruppe

Fix return value of `LLVMRustMetadataAsValue`

`LLVMRustMetadataAsValue` would previously return `void`, despite the
corresponding Rust function expecting to return a `ValueRef`.
......@@ -566,8 +566,8 @@ extern "C" void LLVMRustAddModuleFlag(LLVMModuleRef M, const char *Name,
unwrap(M)->addModuleFlag(Module::Warning, Name, Value);
}
extern "C" void LLVMRustMetadataAsValue(LLVMContextRef C, LLVMMetadataRef MD) {
wrap(MetadataAsValue::get(*unwrap(C), unwrap(MD)));
extern "C" LLVMValueRef LLVMRustMetadataAsValue(LLVMContextRef C, LLVMMetadataRef MD) {
return wrap(MetadataAsValue::get(*unwrap(C), unwrap(MD)));
}
extern "C" LLVMRustDIBuilderRef LLVMRustDIBuilderCreate(LLVMModuleRef M) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册