[llvm] r210895 - [Win32] Let utils/not aware of abort(), aka llvm_unreachable(), in msvcrt.
NAKAMURA Takumi
geek4civic at gmail.com
Mon Jun 23 14:48:18 PDT 2014
I didn't notice that utils/not would execute out-of-tree tools.
Could you update utils/not if it would work for you?
s/if (Result == 3)/if (ExpectCrash && Result == 3)/
I intended "not --crash" would catch abort().
Let me know if you knew better ways.
2014-06-24 6:35 GMT+09:00 Reid Kleckner <rnk at google.com>:
> This broke Clang's test/Index/comment-xml-schema.c test for me. Apparently
> I'm picking up xmllint.exe from Cygwin, and it exits with exit code 3 when
> something fails to validate.
>
>
> On Fri, Jun 13, 2014 at 5:23 AM, NAKAMURA Takumi <geek4civic at gmail.com>
> wrote:
>>
>> Author: chapuni
>> Date: Fri Jun 13 07:23:56 2014
>> New Revision: 210895
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=210895&view=rev
>> Log:
>> [Win32] Let utils/not aware of abort(), aka llvm_unreachable(), in msvcrt.
>>
>> It has exit code as 3. abort(), aka unreachable, may be handled as crash.
>>
>> FIXME: Could we move this into Win32/Program.inc?
>>
>> Modified:
>> llvm/trunk/utils/not/not.cpp
>>
>> Modified: llvm/trunk/utils/not/not.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/not/not.cpp?rev=210895&r1=210894&r2=210895&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/utils/not/not.cpp (original)
>> +++ llvm/trunk/utils/not/not.cpp Fri Jun 13 07:23:56 2014
>> @@ -32,6 +32,13 @@ int main(int argc, const char **argv) {
>> std::string ErrMsg;
>> int Result = sys::ExecuteAndWait(Program, argv, nullptr, nullptr, 0, 0,
>> &ErrMsg);
>> +#ifdef _WIN32
>> + // Handle abort() in msvcrt -- It has exit code as 3.
>> + // abort(), aka unreachable, may be handled as crash.
>> + // FIXME: Could we move this into Win32/Program.inc?
>> + if (Result == 3)
>> + Result = -3;
>> +#endif
>> if (Result < 0) {
>> errs() << "Error: " << ErrMsg << "\n";
>> if (ExpectCrash)
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
More information about the llvm-commits
mailing list