Fixes PR34966 as added call graph edges allow to build correct module
imports/exports. With fixed imports/exports ThinLTO can see which
functions are used and keeps both static and non-static functions as
both of them are used.
rdar://problem/35099885
The following testcase triggers this assertion: