This patch allows importing readonly variables which have initializer referencing other functions or variables. Referenced functions (or vars) are promoted but not imported.
This allows two things to be done:
- Replacing indirect calls with direct calls to functions referenced in initializer
- Additional DCE with -Wl,-mllvm,-function-sections -Wl,-mllvm,-data-sections, -Wl,--gc-sections linker flags
document constant param