https://kotlinlang.org logo
#compiler
Title
# compiler
h

hfhbd

11/15/2023, 9:03 AM
Hey, I want to implement a FIR compiler plugin, which "only" needs to analyze the body of a function, without modifications. I can't use KSP because it does not support getting the body and its statements. Do you have any docs which extension would be the start point to visit the function body after resolution?
j

Javier

11/15/2023, 9:11 AM
h

hfhbd

11/15/2023, 11:04 AM
Thank you! And how do you actually register your
FirAdditionalCheckersExtension
? I used cite as template from Jake and he uses
IrGenerationExtension.registerExtension
, but what is the fir equivalent?
j

Javier

11/15/2023, 12:29 PM
same place but with fir API
Copy code
FirExtensionRegistrarAdapter::registerExtension
2 Views