[Support] Replace function with function_ref in writeFileAtomically. NFC
authorIlya Biryukov <ibiryukov@google.com>
Wed, 18 Sep 2019 08:31:28 +0000 (08:31 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Wed, 18 Sep 2019 08:31:28 +0000 (08:31 +0000)
commitedd5dfcd890dad921bb0c0edb1551597bd6124d7
tree36863eecc363735690fe4a50269756e5dd6bdac8
parent93e1f73b6b2dc751a27568da5797cc2ba8436385
[Support] Replace function with function_ref in writeFileAtomically. NFC

Summary:
The latter is slightly more efficient and communicates the intent of the
API: writeFileAtomically does not own or copy the callback, it merely
calls it at some point.

Reviewers: jkorous

Reviewed By: jkorous

Subscribers: hiraditya, dexonsmith, jfb, llvm-commits, cfe-commits

Tags: #llvm

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

llvm-svn: 372201
llvm/include/llvm/Support/FileUtilities.h
llvm/lib/Support/FileUtilities.cpp