about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2017-12-12 17:27:37 +0000
committervarkor <github@varkor.com>2017-12-12 17:27:37 +0000
commit6487ee34441987353a0d7e5d91a28877387c130a (patch)
tree02014c46aa6455438fe3536e1b31394464910087 /src/rustllvm/RustWrapper.cpp
parent3ece2d94d3144cd41c8a3fe5ce4cfdb06967ab0a (diff)
downloadrust-6487ee34441987353a0d7e5d91a28877387c130a.tar.gz
rust-6487ee34441987353a0d7e5d91a28877387c130a.zip
Fix return value of `LLVMRustMetadataAsValue`
`LLVMRustMetadataAsValue` would previously return `void`, despite the
corresponding Rust function expecting to return a `ValueRef`.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index ee48d49da46..6f51ea67cb1 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -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) {