Skip to content

Commit 995f9f4

Browse files
committed
Silence warning when building without assertions.
1 parent 022a8b1 commit 995f9f4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/IRGen/IRBuilder.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ class IRBuilder : public IRBuilderBase {
3838
/// ordering.
3939
llvm::BasicBlock *ClearedIP;
4040

41+
#ifndef NDEBUG
4142
/// Whether debug information is requested. Only used in assertions.
4243
bool DebugInfo;
44+
#endif
4345

4446
// Set calling convention of the call instruction using
4547
// the same calling convention as the callee function.
@@ -54,7 +56,11 @@ class IRBuilder : public IRBuilderBase {
5456

5557
public:
5658
IRBuilder(llvm::LLVMContext &Context, bool DebugInfo)
57-
: IRBuilderBase(Context), ClearedIP(nullptr), DebugInfo(DebugInfo) {}
59+
: IRBuilderBase(Context), ClearedIP(nullptr)
60+
#ifndef NDEBUG
61+
, DebugInfo(DebugInfo)
62+
#endif
63+
{}
5864

5965
/// Determines if the current location is apparently reachable. The
6066
/// invariant we maintain is that the insertion point of the builder

0 commit comments

Comments
 (0)