As discussed on IRC, for function importing we don't need to link in
the type, enums and many other metadata hanging off the DICompileUnit
for the source module. With this patch, we will only map in the needed
DISubprograms and the DIFile (which is required) and a few simple
non-metadata members.
Do we also need to link in the DIImportedEntity though? We are marking any
DISubprograms reached from them as needed (findNeededSubprograms()).
I'm not sure this is true. Here's a type you might have to import that is not in the retained types list:
The 'foo' type is not in the retained types list, but it may need to be imported if 'f(foo)' is imported, yes?