[Utility] Avoid a few unnecessary copies (NFC)

Avoid unnecessary copies by either passing by const-reference or moving
the argument.

llvm-svn: 361544
GitOrigin-RevId: 266b65f8404fd2dbac6b17ebdb90507273418cb0
4 files changed