[PATCH] D36758: [LLD COFF / PDB] Incrementally update the BuildId when writing a PDB.

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 13:37:18 PDT 2017


zturner added inline comments.


================
Comment at: lld/COFF/Writer.cpp:786
 
+void Writer::loadExistingBuildId(StringRef Path) {
+  // We don't need to incrementally update a previous build id if we're not
----------------
ruiu wrote:
> Looks like this function does not depend on `Writer` class. Can you make this a static non-member function that returns a `const codeview::DebugInfo *` (or a nullptr if no previous build id is available)?
> 
> Also I think this function needs comment as to why we want to keep existing build id if available.
It would have to return an `Optional<codeview::DebugInfo>`.  It can't return by pointer because after the function returns the file will be closed and the memory the pointer points to will be detroyed.

But yea I can do that.


https://reviews.llvm.org/D36758





More information about the llvm-commits mailing list