InlineFunction method, call CloneFunctionInto instead of CloneAndPruneFunctionInto?

Just throwing this out there in hope that someone already knows the answer. I’m trying to narrow down something that fails post inlining. Anyone know why InlineFunction switching CloneAndPruneFunctionInto with CloneFunctionInto is invalid?

The error I get is
Wrong types for attribute: byval inalloca nest noalias nocapture nonnull readnone readonly signext sret zeroext dereferenceable(1)
void (%“class.A::aaa”, %struct.bbb)* @foo_function
LLVM ERROR: Broken function found, compilation aborted!

Post-inlining method dump shows
define internal fastcc zeroext void @foo_function(%“class.A::aaa”, %struct.bbb) #4

Perhaps zeroext isn’t compatible with void return type?


I’m not familiar with the context - but you’re right, zeroext is incompatible with void (in fact, it’s incompatible with any non-integer type).