Similar to Windows Itanium, PS4 is also an Itanium C++ ABI variant and shares the goal of source code compatibility with Microsoft code that uses dllimport/export.
This change introduces a new function to determine from the triple if an environment aims for compatibility with MS w.r.t these attributes and guards the relevant code paths using that function.
CGM also has a getTarget() method to get TargetInfo if the predicate moves there.