[PATCH] D21721: Object: Replace NewArchiveIterator with a simpler NewArchiveMember class. NFCI.
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 28 18:50:19 PDT 2016
rafael added a comment.
I like the general idea.
================
Comment at: include/llvm/Object/ArchiveWriter.h:25
@@ +24,3 @@
+ std::unique_ptr<MemoryBuffer> Buf;
+ sys::TimeValue ModTime = sys::TimeValue::PosixZeroTime();
+ unsigned UID = 0, GID = 0, Perms = 0644;
----------------
Getting the time in here seems really odd.
================
Comment at: include/llvm/Object/ArchiveWriter.h:32
@@ -40,1 +31,3 @@
+ std::error_code &EC);
+ NewArchiveMember(StringRef FileName, bool Deterministic, std::error_code &EC);
};
----------------
Passing &EC to constructor is a really nasty thing. How about a private constructor and a static method that returns an Expected?
http://reviews.llvm.org/D21721
More information about the llvm-commits
mailing list