Skip to content

Commit 97ecde2

Browse files
committed
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 <[email protected]>
1 parent 39acb06 commit 97ecde2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/rustllvm/RustWrapper.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -493,5 +493,7 @@ extern "C" LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B,
493493
}
494494

495495
extern "C" void LLVMSetDebug(int Enabled) {
496+
#ifndef NDEBUG
496497
DebugFlag = Enabled;
498+
#endif
497499
}

0 commit comments

Comments
 (0)