[cfe-commits] r100493 - /cfe/trunk/tools/driver/cc1_main.cpp

Douglas Gregor dgregor at apple.com
Tue Apr 6 11:53:12 PDT 2010


On Apr 6, 2010, at 11:48 AM, Chris Lattner wrote:

> 
> On Apr 6, 2010, at 10:34 AM, Douglas Gregor wrote:
> 
>>> 
>>> RUN: clang asm.c -c -o t.o -integrated-as
>>> RUN: otool -tv t.o | FileCheck %s
>>> 
>>> How do I ensure this is only run on a machine that has otool?
>> 
>> 
>> I guess we could teach lit about otool.
>> 
>> Perhaps there is a negative test you could add, e.g., where the inline asm is ill-formed and MC produces a diagnostic that can be checked with FileCheck [*]?
> 
> Ah, doing an errorneous test makes sense.
> 
>> [*] I'm assuming that MC can't yet route its error messages through Clang's diagnostic system, so -verify won't work.
> 
> It actually can!  

Cooool. D

> The problem is that the errors complain about "<inline asm>:1:2" which -verify doesn't handle yet.  I'm adding a "asm generated from here" line pointing back to the original .c file next.

Is the <inline asm> a temporary thing? It seems like we should be able to map from source locations inside the inline asm back to real locations in the original .c file.

	- Doug



More information about the cfe-commits mailing list