[all-commits] [llvm/llvm-project] 021de7: [llvm-objcopy][NFC] Move ownership keeping code in...
avl-llvm via All-commits
all-commits at lists.llvm.org
Wed Mar 17 07:29:43 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 021de7cf80268091cf13485a538b611b37d0b33e
https://github.com/llvm/llvm-project/commit/021de7cf80268091cf13485a538b611b37d0b33e
Author: Alexey Lapshin <a.v.lapshin at mail.ru>
Date: 2021-03-17 (Wed, 17 Mar 2021)
Changed paths:
M llvm/include/llvm/Support/FileOutputBuffer.h
M llvm/lib/Support/FileOutputBuffer.cpp
M llvm/tools/llvm-objcopy/llvm-objcopy.cpp
M llvm/tools/llvm-objcopy/llvm-objcopy.h
Log Message:
-----------
[llvm-objcopy][NFC] Move ownership keeping code into restoreStatOnFile().
The D93881 added functionality which preserve ownership for output file
if llvm-objcopy is called under root. That code was added into the place
where output file is created. The llvm-objcopy already has a function which
sets/restores rights/permissions for the output file.
That is the restoreStatOnFile() function. This patch moves code
(preserving ownershipping) into the restoreStatOnFile() function.
Differential Revision: https://reviews.llvm.org/D98511
More information about the All-commits
mailing list