Similar to https://reviews.llvm.org/D136111, this time for class
methods. D136111 summary: In OpenMP target offloading an in other offloading languages, we maintain a difference between device functions and kernel functions. Kernel functions must be visible to the host and act as the entry point to the target device. Device functions however cannot be called directly by the host and must be called by a kernel function. Currently, we make all definitions on the device protected by default. Because device functions cannot be called or used by the host they should have hidden visibility. This allows for the definitions to be better optimized via LTO or other passes. This patch marks every device class methods in the AST as having hidden visibility. The kernel function is generated later at code-gen and we set its visibility explicitly so it should not be affected. This prevents the user from overriding the visibility, but since the user can't do anything with these symbols anyway there is no point exporting them right now.