[swift-dev] Problem in parsing SIL

Joe Groff jgroff at apple.com
Tue Jun 21 16:10:08 CDT 2016


> On Jun 21, 2016, at 2:03 PM, Slava Pestov via swift-dev <swift-dev at swift.org> wrote:
> 
> Hi Mikio,
> 
> Try this:
> 
> swiftc -frontend -emit-silgen classdecl.swift > classdecl.sil
> swiftc -parse-sil classdecl.sil
> 
> I'm not sure why -emit-silgen sometimes emits type declarations and other times not. The only difference I can see is what without the -frontend flag, the driver passes in -primary-file, whereas with -frontend, it does not.
> 
> Perhaps Joe or Jordan can chime in.

This is clearly a bug, but SIL's parser and printer quality generally doesn't have much pressure on it beyond what's minimally necessary to enable optimizer and codegen debugging.

-Joe


More information about the swift-dev mailing list