[PATCH] D92902: [llvm-elfabi] Add flag to keep timestamp when output is the same

Haowei Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 18 21:52:19 PST 2020


haowei marked an inline comment as done.
haowei added inline comments.


================
Comment at: llvm/lib/InterfaceStub/ELFObjHandler.cpp:671
+  if (FilePath == "-" || sys::fs::status(FilePath, Stat))
+    Stat.permissions(static_cast<sys::fs::perms>(0777));
   ELFStubBuilder<ELFT> Builder{Stub};
----------------
grimar wrote:
> I think this needs a comment.
Sorry I forgot to deleted them. Stat is actually not used after deciding not to rewrite file stat after overwritten the file.


================
Comment at: llvm/tools/llvm-elfabi/llvm-elfabi.cpp:74
+    return YAMLErr;
+  OutStr.str();
+
----------------
grimar wrote:
> You don't need this line I think?
https://llvm.org/doxygen/raw__ostream_8h_source.html#l00625 I think I need it. It calls flush() to write data into TBEStr, which is why I call it here. I added comment in the new diff.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92902/new/

https://reviews.llvm.org/D92902



More information about the llvm-commits mailing list