From 764129822f1b8f5c765fa9915fb021ecf26489ef Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Sat, 24 Oct 2015 22:15:32 +0000 Subject: [PATCH] [Support] Add comment to explain why we can't drop NDEBUG. Discussed with: Benjamin Kramer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251210 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/UnicodeCharRanges.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/llvm/Support/UnicodeCharRanges.h b/include/llvm/Support/UnicodeCharRanges.h index 9f738dff110..134698c3ec6 100644 --- a/include/llvm/Support/UnicodeCharRanges.h +++ b/include/llvm/Support/UnicodeCharRanges.h @@ -51,6 +51,11 @@ public: /// the constructor, so it makes sense to create as few UnicodeCharSet /// instances per each array of ranges, as possible. #ifdef NDEBUG + + // FIXME: This could use constexpr + static_assert. This way we + // may get rid of NDEBUG in this header. Unfortunately there are some + // problems to get this working with MSVC 2013. Change this when + // the support for MSVC 2013 is dropped. LLVM_CONSTEXPR UnicodeCharSet(CharRanges Ranges) : Ranges(Ranges) {} #else UnicodeCharSet(CharRanges Ranges) : Ranges(Ranges) { -- 2.34.1