From 65ce06c3738d3982c196eae94c6a9bb3405634a2 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Wed, 26 Jun 2013 14:56:11 +0200 Subject: [PATCH] NDEBUG stands for NO DEBUG... --- Module.mk | 6 +++++- lib/Interpreter/Transaction.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Module.mk b/Module.mk index b18ec25a..b0d832a6 100644 --- a/Module.mk +++ b/Module.mk @@ -59,9 +59,13 @@ CLINGLDFLAGSEXTRA := -Wl,--no-ctors-in-init-array endif # Define NDEBUG for consistency with llvm and clang. +CLINGCXXNDEBUG := -DNDEBUG ifeq ($(ROOTBUILD),debug) -CLINGCXXFLAGS += -DNDEBUG +ifneq($(LLVMDEV),) +CLINGCXXNDEBUG := endif +endif +CLINGCXXFLAGS += $(CLINGCXXNDEBUG) ifeq ($(ARCH),win32gcc) # Hide llvm / clang symbols: diff --git a/lib/Interpreter/Transaction.cpp b/lib/Interpreter/Transaction.cpp index c26ecc35..011e9c9d 100644 --- a/lib/Interpreter/Transaction.cpp +++ b/lib/Interpreter/Transaction.cpp @@ -75,7 +75,7 @@ namespace cling { if (!m_DeclQueue) m_DeclQueue.reset(new DeclQueue()); -#ifdef NDEBUG +#ifndef NDEBUG // Check for duplicates for (size_t i = 0, e = m_DeclQueue->size(); i < e; ++i) assert((*m_DeclsQueue)[i] != DCI && "Duplicates?!");