Displaying 20 results from an estimated 2000 matches similar to: "NDEBUG in Header Files"
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.
>
> For now, make sure your definition of NDEBUG
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,
2016 Nov 16
4
[RFC] Runtime checks for ABI breaking build of LLVM
Hi all,
An issue that come up from time to time and has cost hours for debug for many of us and users of LLVM is that an assert build isn’t ABI compatible with a release build.
The CMake flags that controls this behavior is LLVM_ABI_BREAKING_CHECKS (
LLVM_ABI_BREAKING_CHECKS:STRING
Used to decide if LLVM should be built with ABI breaking checks or not. Allowed values are WITH_ASSERTS (default),
2014 Jan 03
2
[LLVMdev] [cfe-dev] Goal for 3.5: Library-friendly headers
On 03/01/2014 21:55, Chandler Carruth wrote:
>
> 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
2016 Nov 16
2
[RFC] Runtime checks for ABI breaking build of LLVM
> On Nov 16, 2016, at 12:05 PM, Jonathan Roelofs <jonathan at codesourcery.com> wrote:
>
>
>
> On 11/16/16 11:48 AM, Mehdi Amini via llvm-dev wrote:
>> Hi all,
>>
>> An issue that come up from time to time and has cost hours for debug for
>> many of us and users of LLVM is that an assert build isn’t ABI
>> compatible with a release build.
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 an
>assert() later. Only
2015 Jul 13
2
[LLVMdev] Problem with InsertPointGuard ABI?
Hi,
I have problem with IRBuilderBase::InsertPointGuard class that simply does
not work in the release build of my project. The class does not restore the
IRBuilder's insert point correctly when NDEBUG macro is set. It happens on
OSX system only, trunk version of the LLVM built with brew.
I suspect it is the ABI problem. InsertPointGuard uses AssertingVT for
debug builds.
LLDB gets confused
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.
>>
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
2014 Jan 04
2
[LLVMdev] [cfe-dev] Goal for 3.5: Library-friendly headers
On Jan 3, 2014, at 2:19 PM, Chandler Carruth <chandlerc at google.com> wrote:
>> While having different components of LLVM and consumers of LLVM able to intermix NDEBUG and !NDEBUG built code freely without ABI issues is nice-to-have in my book, the functionality provided by AssertingVH is significantly more nice-to-have, and I don't see any easy ways to contain or limit the
2016 Nov 16
2
Non-determinism in LLVM codegen
> On 2016-Nov-15, at 15:16, Hal Finkel <hfinkel at anl.gov> wrote:
>
> ----- Original Message -----
>> From: "Mandeep Singh via llvm-dev Grang" <llvm-dev at lists.llvm.org>
>> To: llvm-dev at lists.llvm.org, "mehdi amini" <mehdi.amini at apple.com>, dexonsmith at apple.com, zinob at codeaurora.org
>> Sent: Tuesday, November 15, 2016
2015 Jul 21
2
[LLVMdev] Problem with InsertPointGuard ABI?
On Tue, Jul 21, 2015 at 6:30 PM Justin Bogner <mail at justinbogner.com> wrote:
> 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.
>
2015 Aug 03
8
[LLVMdev] Ideas for making llvm-config --cxxflags more useful
> On Aug 3, 2015, 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
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
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
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
2017 Jan 24
2
Should analyses be able to hold AssertingVH to IR? (related to PR28400)
> On Jan 23, 2017, at 10:07 PM, Sean Silva <chisophugis at gmail.com> wrote:
>
>
>
> On Mon, Jan 23, 2017 at 1:08 AM, Chandler Carruth <chandlerc at gmail.com <mailto:chandlerc at gmail.com>> wrote:
> This thread kinda died. I'd like to revive it.
>
> The new PM stuff is making excellent progress, and this is actually one of the last things to
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 turned off for
the main binary.
Signed-off-by: Eric
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
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