[PATCH] D22206: COFF: drop the dependency on LIB.EXE for implibs
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 10 18:32:54 PDT 2016
compnerd added inline comments.
Comment at: COFF/Librarian.cpp:140
@@ +139,3 @@
+ uint32_t Size =
+ /* COFF Header */
> It seems that you don't need to compute the size beforehand. Instead, you can construct a std::vector or something like that and then get the size of the constructed object at end of this function. (This would be a bit inefficient, but because this function is not hot at all, it should be fine.)
> Or you can create a buffer that is large enough to store any import library file and truncate it at end of this funciton.
Im not sure I understand. The size is dependent on the name of the library, which is user input. The size is used for the buffer allocation.
More information about the llvm-commits