For PlayStation we offer source code compatibility with Microsoft's dllimport/export annotations; however, our file format is based on ELF.
To support this we translate from DLL storage class to ELF visibility at the end of codegen in Clang.
Other toolchains have used similar strategies (e.g. see the documentation for this ARM toolchain - https://developer.arm.com/documentation/dui0530/i/migrating-from-rvct-v3-1-to-rvct-v4-0/changes-to-symbol-visibility-between-rvct-v3-1-and-rvct-v4-0).
This patch adds the ability to perform this translation. Options are provided to support customizing the mapping behaviour.
Note, other comments are not capitalized.