Permalink
Browse files

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>
  • Loading branch information...
1 parent 39acb06 commit 97ecde297e2b49fc6445c233cb95d8cd1c341b2d @lucab lucab committed Oct 8, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/rustllvm/RustWrapper.cpp
View
2 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
}

0 comments on commit 97ecde2

Please sign in to comment.