about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-01-28 05:11:28 -0800
committerbors <bors@rust-lang.org>2014-01-28 05:11:28 -0800
commitb3d10f43833f065ec0e635ce6cdb2332f4ee5049 (patch)
treea80594221e99487e77530f18bdf4759f0b0b40cc /src/rustllvm/RustWrapper.cpp
parenta39be7ca2ef65f08c160404c1675d93ee7d0f059 (diff)
parentea7b20d8f279ea8c63b9a4b8e9129fce0e3c2b5d (diff)
downloadrust-b3d10f43833f065ec0e635ce6cdb2332f4ee5049.tar.gz
rust-b3d10f43833f065ec0e635ce6cdb2332f4ee5049.zip
auto merge of #11864 : comex/rust/11352, r=alexcrichton
Set "Dwarf Version" to 2 on OS X to avoid toolchain incompatibility, and
set "Debug Info Version" to prevent debug info from being stripped from
bitcode.

Fixes #11352.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index 280df8cb10f..2107f7c39a2 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -156,6 +156,14 @@ DIT unwrapDI(LLVMValueRef ref) {
     return DIT(ref ? unwrap<MDNode>(ref) : NULL);
 }
 
+extern "C" const uint32_t LLVMRustDebugMetadataVersion = DEBUG_METADATA_VERSION;
+
+extern "C" void LLVMRustAddModuleFlag(LLVMModuleRef M,
+                                      const char *name,
+                                      uint32_t value) {
+    unwrap(M)->addModuleFlag(Module::Warning, name, value);
+}
+
 extern "C" DIBuilderRef LLVMDIBuilderCreate(LLVMModuleRef M) {
     return new DIBuilder(*unwrap(M));
 }