Skip to content

Commit

Permalink
Conditional usage of LLVM DebugFlag
Browse files Browse the repository at this point in the history
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
lucab committed Oct 11, 2012
1 parent 39acb06 commit 97ecde2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rustllvm/RustWrapper.cpp
Expand Up @@ -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.