> On Jun 21, 2016, at 14:10, Joe Groff via swift-dev <swift-dev@swift.org> > wrote: > > >> On Jun 21, 2016, at 2:03 PM, Slava Pestov via swift-dev >> <swift-dev@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.
We don't try to print ASTs when -primary-file is passed because it would mean merging ASTs from different files, which isn't going to be correct in the presence of 'private'. Jordan _______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev