about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorLuca Bruno <lucab@debian.org>2012-10-08 21:40:09 +0200
committerLuca Bruno <lucab@debian.org>2012-10-11 07:33:49 +0200
commit97ecde297e2b49fc6445c233cb95d8cd1c341b2d (patch)
tree3e91fde78d5ef642b2b54147e669e416d3376495 /src/rustllvm/RustWrapper.cpp
parent39acb06503bc387709b22c17c32cd58cd16b617a (diff)
downloadrust-97ecde297e2b49fc6445c233cb95d8cd1c341b2d.tar.gz
rust-97ecde297e2b49fc6445c233cb95d8cd1c341b2d.zip
Conditional usage of LLVM DebugFlag
DebugFlag is conditionally exported by LLVM in llvm/Support/Debug.h
in-between an #ifndef NDEBUG block; RustWrapper should not
unconditionally use it. This closes #3701.

Signed-off-by: Luca Bruno <lucab@debian.org>
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index fc2049507ee..498a4e137f0 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -493,5 +493,7 @@ extern "C" LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B,
 }
 
 extern "C" void LLVMSetDebug(int Enabled) {
+#ifndef NDEBUG
   DebugFlag = Enabled;
+#endif
 }