[libc] Add Convenience syscall Template Function

Summary: This patch adds a convenience template function so we don't need to cast all types to `long` manually when calling `__llvm_libc::syscall`.

Reviewers: sivachandra, MaskRay, gchatelet

Reviewed By: sivachandra

Subscribers: libc-commits, tschuett

Differential Revision: https://reviews.llvm.org/D74530

GitOrigin-RevId: 2c73c266665108ab84a27b11c7860db4bd839225
2 files changed