[Interop] Fix CCall parameter handling for LazyIr.

This commit is contained in:
Sergey Bogolepov
2020-01-31 11:45:16 +07:00
committed by Sergey Bogolepov
parent c1d20ae511
commit 7d48c580ca
@@ -615,6 +615,8 @@ private fun IrType.isCEnumType(): Boolean {
// Make sure external stubs always get proper annotaions.
private fun IrDeclaration.hasCCallAnnotation(name: String): Boolean =
this.annotations.hasAnnotation(cCall.child(Name.identifier(name)))
// LazyIr doesn't pass annotations from descriptor to IrValueParameter.
|| this.descriptor.annotations.hasAnnotation(cCall.child(Name.identifier(name)))
private fun IrValueParameter.isWCStringParameter() = hasCCallAnnotation("WCString")