From 97ecde297e2b49fc6445c233cb95d8cd1c341b2d Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Mon, 8 Oct 2012 21:40:09 +0200 Subject: [PATCH] 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 --- src/rustllvm/RustWrapper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index fc2049507eed9..498a4e137f0e3 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 }