Displaying 20 results from an estimated 349 matches for "ndebug".
Did you mean:
debug
2020 Apr 10
2
[RFC] Usage of NDEBUG as a guard for non-assert debug code
On 2020-04-10, Michael Kruse via llvm-dev wrote:
>#ifndef NDEBUG in the LLVM source and assert() are at least somewhat
>linked. For instance, consider
>https://github.com/llvm/llvm-project/blob/8423a6f36386aabced2a367c0ea53487901d31ca/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp#L2668
>
>The #ifndef NDEBUG is used to guard the value that checked in...
2015 Jul 21
2
[LLVMdev] Problem with InsertPointGuard ABI?
On Tue, Jul 21, 2015 at 5:55 PM Justin Bogner <mail at justinbogner.com> wrote:
> Paweł Bylica <chfast at gmail.com> writes:
> > I can confirm that the issue has been caused by NDEBUG flag.
> >
> > On Mon, Jul 13, 2015 at 6:29 PM Reid Kleckner <rnk at google.com> wrote:
> >
> > The layout of AssertingVH has depended on NDEBUG since 2009, which
> > predates any of our efforts to make LLVM's ABI resilient to
> mismatched
> >...
2015 Jul 21
2
[LLVMdev] Problem with InsertPointGuard ABI?
I can confirm that the issue has been caused by NDEBUG flag.
On Mon, Jul 13, 2015 at 6:29 PM Reid Kleckner <rnk at google.com> wrote:
> The layout of AssertingVH has depended on NDEBUG since 2009, which
> predates any of our efforts to make LLVM's ABI resilient to mismatched
> NDEBUG definitions between LLVM and its users.
>
>...
2020 Apr 09
7
[RFC] Usage of NDEBUG as a guard for non-assert debug code
Hi all,
During discussions about assertions in the Flang project, we noticed that there are a lot of cases in LLVM that #ifndef NDEBUG is used as a guard for non-assert code that we want enabled in debug builds.
This works fine on its own, however it affects the behaviour of LLVM_ENABLE_ASSERTIONS; since NDEBUG controls whether assertions are enabled or not, a lot of debug code gets enabled in addition to asserts if you specify t...
2016 Jul 01
2
NDEBUG in Header Files
Hi everyone,
we have several header files in which the NDEBUG macro is being used. In
some of these, the NDEBUG macro changes the size, the interface, or the
layout of a type. One example is AssertingVH, which turns into a flat,
transparent Value* wrapper in Release build. Now everywhere you use these
headers, the state of the NDEBUG flag must be the same, or...
2017 Oct 04
3
Question: Should we consider valid a variable defined #ifndef NDEBUG scope and used in assert?
Hi,
While audit our code, we found out a strange pattern in one of the LLVM headers and we were wondering if that was expected or if it should be fixed.
Namely the problem looks like this:
#ifndef NDEBUG
// Define some variable.
#endif
assert(/*use this variable, i.e., outside of the ifndef NDEBUG scope*/);
This happens in include/llvm/IR/ValueHandle.h for the variable Poisoned line 494
This works because when we build LLVM with assert we explicitly disable NDEBUG:
if( LLVM_ENABLE_ASSERTIONS )...
2014 Jan 03
2
[LLVMdev] [cfe-dev] Goal for 3.5: Library-friendly headers
...On Tue, Nov 12, 2013 at 1:20 AM, Chris Lattner <clattner at apple.com
> <mailto:clattner at apple.com>> wrote:
>
> n Nov 11, 2013, at 12:09 PM, Alp Toker <alp at nuanti.com
> <mailto:alp at nuanti.com>> wrote:
>
> >> Even when you have a !NDEBUG build, the platform assert() is pretty
> >> crummy on Windows and generates, at best a UTF-16 dump, or
> sometimes
> >> just pops up a dialog. WebKit and other projects take the same
> approach
> >> and define their own assertion macros to deal w...
2011 Jan 07
1
[LLVMdev] about NDEBUG
Hi Mr/Mz,
I have built and installed llvm-2.8 in debug mode using:
>SRC_DIR/configure --prefix=INS_DIR --enable-debug-runtime
--disable-optimized --enable-debug-symbols
>make install
It seems the NDEBUG controls a lot of print-out of debug information, by
using DEBUG() or dbgs().
And it is said that NDEBUG is in enabled in debug mode, but I find it does
not work and the -debug option is not recognized. How should I enable NDEBUG
or enable DEBUG() and dbgs()? Should I define NDEBUG in the .cpp fil...
2017 Oct 04
2
Question: Should we consider valid a variable defined #ifndef NDEBUG scope and used in assert?
Good point, I forgot to check the standard.
Given the clang was failing I assumed the code was wrong x).
I am guessing there is something weird with the project, because indeed, paragraph 7.2 of the standard says:
The assert macro is redefined according to the current state of NDEBUG each time that
<assert.h> is included.
> On Oct 4, 2017, at 2:53 PM, Craig Topper <craig.topper at gmail.com> wrote:
>
> I thought NDEBUG was what the assert macro also used to decide whether to be an assert or not.
>
> ~Craig
>
> On Wed, Oct 4, 2017 at 2:41...
2015 Jul 21
2
[LLVMdev] Problem with InsertPointGuard ABI?
...te:
> Paweł Bylica <chfast at gmail.com> writes:
> > On Tue, Jul 21, 2015 at 5:55 PM Justin Bogner <mail at justinbogner.com>
> wrote:
> >
> > Paweł Bylica <chfast at gmail.com> writes:
> > > I can confirm that the issue has been caused by NDEBUG flag.
> > >
> > > On Mon, Jul 13, 2015 at 6:29 PM Reid Kleckner <rnk at google.com>
> wrote:
> > >
> > > The layout of AssertingVH has depended on NDEBUG since 2009,
> which
> > > predates any of our efforts to mak...
2015 Aug 03
8
[LLVMdev] Ideas for making llvm-config --cxxflags more useful
...5, at 10:24 AM, Chris Bieneman <beanz at apple.com> wrote:
>
> Hey Tom,
>
> I’m not a regular user of llvm-config, but this sounds completely right to me, and it would be a significant improvement over what we have now.
>
> The only question I want to raise is, what about NDEBUG? There are headers that conditionalize on NDEBUG, which could lead to ABI incompatibility in the C++ API.
Is it something that can be fixed or would it be too complicated to handle?
It would be nice in general to be able to link a “Non assert” build of Clang with an “Assert" version of LLVM...
2020 Jul 07
2
[nbdkit PATCH] RFC tests: Avoid odd test behavior under NDEBUG
While we support compilation with CFLAGS=-DNDEBUG for the brave user
desiring to avoid assertion overhead, this causes the tests to be less
powerful. Fortunately, a quick test of './configure CFLAGS=-DNDEBUG'
didn't hit any test failures, but it seems better to just ensure that
assertions always work in our tests, even if they are tur...
2013 Nov 12
3
[LLVMdev] [cfe-dev] Goal for 3.5: Library-friendly headers
On Nov 11, 2013, at 12:09 PM, Alp Toker <alp at nuanti.com> wrote:
>> Even when you have a !NDEBUG build, the platform assert() is pretty
>> crummy on Windows and generates, at best a UTF-16 dump, or sometimes
>> just pops up a dialog. WebKit and other projects take the same approach
>> and define their own assertion macros to deal with this portably.
>>
>> So as f...
2014 Dec 01
2
[PATCH] configure.ac: don't try to unset -g from CFLAGS
Jan Stary wrote:
> Yes, they are optimization switches.
> But what are they doing in a NDEBUG setup?
> It's none of NDEBUG's businnes to be adding these, right?
NDEBUG means "no debug". Turning on optimisations when debug is
disabled makes sense to me. What's the problem?
Erik
--
----------------------------------------------------------------------
Erik de Castr...
2020 Jul 07
0
Re: [nbdkit PATCH] RFC tests: Avoid odd test behavior under NDEBUG
On Tue, Jul 07, 2020 at 09:51:53AM -0500, Eric Blake wrote:
> While we support compilation with CFLAGS=-DNDEBUG for the brave user
> desiring to avoid assertion overhead, this causes the tests to be less
> powerful. Fortunately, a quick test of './configure CFLAGS=-DNDEBUG'
> didn't hit any test failures, but it seems better to just ensure that
> assertions always work in our tests,...
2020 Apr 09
2
[RFC] Usage of NDEBUG as a guard for non-assert debug code
On Thu, Apr 9, 2020 at 9:59 AM Chris Tetreault via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> David,
>
>
>
> In my opinion, NDEBUG is one of those gross old C things that everybody
> complains about. It’s called “Not Debug”, but really it means “Assert
> Disabled”. I think one could be forgiven for actually using it as a
> heuristic of whether or not a build is a debug build, especially since no
> other options are...
2017 Jan 13
0
[PATCH 1/4] Do not override CFLAGS, as CFLAGS is a user flag.
* Furthermore, use NDEBUG globally to detect the presence
of building with more debug output information.
AX_CHECK_ENABLE_DEBUG is easier to use, and nowadays
Gnome has also switched to it from its own custom solution.
---
configure.ac | 19 +------
include/FLAC/assert.h | 2 +-
m4/ax_chec...
2017 Jan 15
0
[PATCH 1/2] Do not override CFLAGS, as CFLAGS is a user flag.
* Furthermore, use NDEBUG globally to detect the presence
of building with more debug output information.
AX_CHECK_ENABLE_DEBUG is easier to use, and nowadays
Gnome has also switched to it from its own custom solution.
---
configure.ac | 52 ++++++++++++------
include/FLAC/assert.h | 2 +-...
2011 Jan 10
1
[LLVMdev] About NDEBUG (Cont)
Hi Li Qingan,
> Thanks for your last reply.
> I have made a critical mistake when I stated my question in last email.
> I built llvm in debug mode, but the NDEBUG seemed to be still defined, such that
> the -debug option is not enabled.
> I have restated my configuration below.
you need to configure with --enable-assertions
In spite of the name, NDEBUG is not related to optimization or debugging
symbols, it means that checking (aka assertions) are dis...
2014 Jan 03
2
[LLVMdev] [cfe-dev] Goal for 3.5: Library-friendly headers
On Jan 3, 2014, at 1:55 PM, Chandler Carruth <chandlerc at google.com> wrote:
> >
> > The key thing then is to make sure that it's safe to enable the
> > assertions in the headers if an application is built with !NDEBUG and
> > linked against an NDEBUG version of LLVM.
>
> Sounds great. I'm pretty confident that there will be no problems - in practice - from any ODR violations that might arise from "assert" differing across library boundaries. We would want some pretty strong practical...