Displaying 5 results from an estimated 5 matches for "__file_".
Did you mean:
__file__
2011 Jul 26
2
[LLVMdev] Proposal for better assertions in LLVM
On Tue, Jul 26, 2011 at 10:56 AM, FlyLanguage <flylanguage at gmail.com> wrote:
> #define ASSERT_STRM(cond, args) \
>> if (!(cond)) AssertionFailureStream(__FILE_**_, __LINE__) << args
>>
>> Note that there's no trailing semicolon, as this is supplied at the
>> point where the macro is invoked.
>>
>> What do you think?
>>
>
> Neat, but inducing a debug trap is even more useful on asserts
> (optionally)....
2011 Jul 26
0
[LLVMdev] Proposal for better assertions in LLVM
> #define ASSERT_STRM(cond, args) \
> if (!(cond)) AssertionFailureStream(__FILE__, __LINE__) << args
>
> Note that there's no trailing semicolon, as this is supplied at the
> point where the macro is invoked.
>
> What do you think?
Neat, but inducing a debug trap is even more useful on asserts (optionally).
2011 Jul 26
0
[LLVMdev] Proposal for better assertions in LLVM
Den 26.07.2011 20:12, skrev Talin:
> On Tue, Jul 26, 2011 at 10:56 AM, FlyLanguage <flylanguage at gmail.com
> <mailto:flylanguage at gmail.com>> wrote:
>
> #define ASSERT_STRM(cond, args) \
> if (!(cond)) AssertionFailureStream(__FILE____, __LINE__)
> << args
>
> Note that there's no trailing semicolon, as this is supplied at the
> point where the macro is invoked.
>
> What do you think?
>
>
> Neat, but inducing a debug trap is even more useful on asserts
&g...
2011 Jul 26
2
[LLVMdev] Proposal for better assertions in LLVM
...6.07.2011 20:12, skrev Talin:
>
>> On Tue, Jul 26, 2011 at 10:56 AM, FlyLanguage <flylanguage at gmail.com
>> <mailto:flylanguage at gmail.com>**> wrote:
>>
>> #define ASSERT_STRM(cond, args) \
>> if (!(cond)) AssertionFailureStream(__FILE_**___, __LINE__)
>> << args
>>
>> Note that there's no trailing semicolon, as this is supplied at the
>> point where the macro is invoked.
>>
>> What do you think?
>>
>>
>> Neat, but inducing a debug trap...
2011 Jul 26
5
[LLVMdev] Proposal for better assertions in LLVM
...a for an improved
assert macro which would use raw_ostream. It would look something like this:
ASSERT_STRM(Ty == STy, "Expected " << Ty << " but got " <<
STy->getElementType(0));
This would transform to:
if (!(Ty == STy))
AssertionFailureStream(__FILE__, __LINE__) <<
"Expected " << Ty << " but got " << STy->getElementType(0);
The AssertionFailureStream is a subtype of raw_ostream whose destructor
calls abort() after printing the contents of the stream to stderr. (I use a
similar technique in...