Re-adding FrontendObserver methods for the sake of external static analysis tools

Hello, I am a researcher at the University of Alberta working on developing SWAN, a Swift program analysis framework. We relied on methods removed in this commit to hook into the compiler using our own observer, so that we could translate the SIL modules and analyze them. However, since this has been changed, we have no way to grab the SILModules without making our own changes to the Swift frontend. Would it be possible to reverse some of these changes or implement another call to the FrontendObserver that would pass the SILModule?

That's probably reasonable (cc @harlanhaskins). Would you be willing to commit some small implementations that can go in unittest/Frontend so that we know not to remove them again in the future?

Yes, apologies for removing these. I'm happy to re-add the implementations of these methods.

I reverted the previous patch, and updated it for the current behavior of the frontend: [Frontend] Re-add FrontendObserver methods by harlanhaskins · Pull Request #24917 · apple/swift · GitHub

2 Likes