similar to: [RFC] Usage of NDEBUG as a guard for non-assert debug code

Displaying 20 results from an estimated 6000 matches similar to: "[RFC] Usage of NDEBUG as a guard for non-assert debug code"

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
2020 Apr 07
3
F18 ready to be merged + preview of merge
Attached is the log. I'm building with: clang version 10.0.0 (https://github.com/llvm/llvm-project/ 3a6da1122b990386edeba0987d0d1fdc9c8dc53d) Target: x86_64-unknown-linux-gnu Thread model: posix On some Ubuntu-like distribution. I also ran with ASAN once and it found a bunch of leaks in bin/tco. Best, -- Mehdi On Tue, Apr 7, 2020 at 4:36 AM Richard Barton <Richard.Barton at
2020 Apr 07
3
F18 ready to be merged + preview of merge
Hi Mehdi, I can't replicate those failures at my end, could you let me know what OS, compiler and CMake flags you're using so I can try and reproduce? Thanks! David Truby ________________________________ From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Mehdi AMINI via llvm-dev <llvm-dev at lists.llvm.org> Sent: 07 April 2020 06:44 To: Richard Barton
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 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 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,
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
2020 Apr 06
2
F18 ready to be merged + preview of merge
Hi llvm-dev We believe we have completed enough of the agreed pre-upstreaming changes to start talking about merging F18 into LLVM. The live status is tracked at [1]. There are a few details that we have not managed to hammer out and we propose to tackle inside the LLVM monorepo. I have put a summary of these at the bottom of this mail. Does anyone have any objections to flang being merged into
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
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
2020 Feb 25
2
Plan for landing flang in monorepo
Hi Eric, Old flang certainly uses C-style strings but f18 uses std::string with few exceptions. Most of the instances in f18 of “char *” aren’t really strings in the C sense – they’re not null terminated and are really just pointers into raw or cooked source files/streams. I can’t think of an instance where the compiler dynamically allocates an array of characters and uses it as a C string. -
2009 Jun 03
2
[LLVMdev] CMake build maturity
Frits van Bommel <fvbommel at wxs.nl> writes: > Paul Melis wrote: >> Just checked: yup, there's plenty of assert()'s in the headers, so >> -D_DEBUG will keep those alive. >> >> Interestingly, when configuring with --enable-optimized and >> --disable-assertions the resulting compilation calls itself a >> "Release-Asserts build" while
2017 Apr 10
2
Question about LLVM Building Error with "-DLLVM_ENABLE_DUMP" and "RelWithDebInfo"
Hi Matthias, >Jingu: Why do you even want a configuration that has LLVM_ENABLE_DUMP but does not have asserts enabled at the same time? My colleague and I am doing custom project using clang/llvm. We have always wanted to use the IR Value's dump() to check our implementation correctly with Debug, Release and another builds. We thought the LLVM_ENABLE_DUMP is for it. If Chris fixes
2009 Jun 04
0
[LLVMdev] CMake build maturity
Hi, > Committed a change for the cmake build that implements the option > LLVM_ENABLE_ASSERTS. Defaults to ON if and only if CMAKE_BUILD_TYPE is > Release. Thanks! I think it might be nice to make this a bit more consistent with Makefile.config. I'd suggest... - use LLVM_DISABLE_ASSERTIONS instead of LLVM_ENABLE_ASSERTS - have it default to OFF (so assertions are enabled) always -
2017 Apr 10
2
Question about LLVM Building Error with "-DLLVM_ENABLE_DUMP" and "RelWithDebInfo"
> On Apr 10, 2017, at 12:37 PM, Matthias Braun <mbraun at apple.com> wrote: > > The situation is not consistent. Yes there are several places where we have the #if in the headers however there are far more cases where it is not. Some points here: > > - This whole LLVM_DUMP_FUNCTION/LLVM_ENABLE_DUMP is about enabling the linker to strip (or not strip) the dumping function in
2020 Jul 15
7
[11.0.0 Release] The release branch is here; trunk is now 12.0.0
Hello everyone, The release branch for LLVM 11 was created from the trunk at 2e10b7a39b930ef8d9c4362509d8835b221fbc0a, and the trunk version was bumped to 12.0.0. Release blockers are tracked by https://llvm.org/PR46725 Please mark any bugs, old or new, that need to be fixed before the release as blocking that bug. Please keep me in the loop via email on any bugs, commits, or other issues that
2009 Jun 04
2
[LLVMdev] CMake build maturity
Jay Foad <jay.foad at gmail.com> writes: >> Committed a change for the cmake build that implements the option >> LLVM_ENABLE_ASSERTS. Defaults to ON if and only if CMAKE_BUILD_TYPE is >> Release. > > Thanks! I think it might be nice to make this a bit more consistent > with Makefile.config. I'd suggest... > > - use LLVM_DISABLE_ASSERTIONS instead of
2014 Jul 18
2
[LLVMdev] Fixing LLVM's CMake interface before LLVM3.5 release
>> I am happy to start writing a patch for the documentation > > Thanks. Please Cc me for review. Will do. >> # LLVM_BUILD_* values available only from LLVM build tree. > > Those were created to simplify building Clang locally against a > LLVM build tree. Clang needs the LLVM source and build trees too, > so this gives it that information. No information is
2019 Aug 19
2
Check length of logical vector also for operands of || and &&?
Hi everyone The following behavior (in R 3.6.1 and R-devel r77040) caught me by surprise today: truthy <- c(TRUE, FALSE) falsy <- c(FALSE, TRUE, FALSE) if (truthy) "check" #> Warning in if (truthy) "check": the condition has length > 1 and only the #> first element will be used #> [1] "check" if (falsy) "check" #> Warning in if
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. >>