about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-06-14 08:46:14 +0000
committerbors <bors@rust-lang.org>2017-06-14 08:46:14 +0000
commitdfa7e21e4ee555d04c0fb86069f5acffee3550ad (patch)
tree8e29f75d4d8a37b5205a1ae76c9f0a4588ddec43 /src/rustllvm/RustWrapper.cpp
parente40ef964fe491b19c22dfb8dd36d1eab14223c36 (diff)
parent5c084fd8edd986d8a4bd9ff37b303f8777623a56 (diff)
downloadrust-dfa7e21e4ee555d04c0fb86069f5acffee3550ad.tar.gz
rust-dfa7e21e4ee555d04c0fb86069f5acffee3550ad.zip
Auto merge of #42433 - marco-c:profiling, r=alexcrichton
Build instruction profiler runtime as part of compiler-rt

r? @alexcrichton

This is #38608 with some fixes.

Still missing:
- [x] testing with profiler enabled on some builders (on which ones? Should I add the option to some of the already existing configurations, or create a new configuration?);
- [x] enabling distribution (on which builders?);
- [x] documentation.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index 838c180c70b..c11c5f4186e 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -466,6 +466,10 @@ extern "C" void LLVMRustAddModuleFlag(LLVMModuleRef M, const char *Name,
   unwrap(M)->addModuleFlag(Module::Warning, Name, Value);
 }
 
+extern "C" void LLVMRustMetadataAsValue(LLVMContextRef C, LLVMRustMetadataRef MD) {
+  wrap(MetadataAsValue::get(*unwrap(C), unwrap(MD)));
+}
+
 extern "C" LLVMRustDIBuilderRef LLVMRustDIBuilderCreate(LLVMModuleRef M) {
   return new DIBuilder(*unwrap(M));
 }