r193685 - Recover instead of crashing on MS assembly when no target is loaded

Dmitri Gribenko gribozavr at gmail.com
Wed Oct 30 15:17:14 PDT 2013


On Wed, Oct 30, 2013 at 2:43 PM, Alp Toker <alp at nuanti.com> wrote:
>
> On 30/10/2013 18:52, Dmitri Gribenko wrote:
>> On Wed, Oct 30, 2013 at 7:29 AM, Alp Toker <alp at nuanti.com> wrote:
>>> Added: cfe/trunk/test/Index/ms-asm-no-target.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/ms-asm-no-target.cpp?rev=193685&view=auto
>>> ==============================================================================
>>> --- cfe/trunk/test/Index/ms-asm-no-target.cpp (added)
>>> +++ cfe/trunk/test/Index/ms-asm-no-target.cpp Wed Oct 30 09:29:28 2013
>>> @@ -0,0 +1,9 @@
>>> +// RUN: c-index-test -test-load-source all -triple x86_64-apple-darwin10 -fasm-blocks -Wno-microsoft %s 2>&1 | FileCheck %s
>>> +
>>> +// Test that we diagnose when the application hasn't initialized LLVM targets
>>> +// supporting the MS-style inline asm parser.
>>> +
>>> +void Break() {
>>> +  __asm { int 3 }
>>> +}
>>> +// CHECK: error: MS-style inline assembly is not available
>> expected-error?
>
> How would you get c-index-test to verify diagnostics? And would you want
> it to?

Ah, sorry -- did not realize that this was a c-index-test-based test.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-commits mailing list