[PATCH] D88213: [llvm-objcopy][NFC] refactor error handling. part 2.
    Martin Storsjö via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Sep 25 00:05:05 PDT 2020
    
    
  
mstorsjo added a comment.
LGTM overall, one change that seems superfluous though.
I'll leave out the formal approval for now, to wait if @jhenderson has more input.
================
Comment at: llvm/tools/llvm-objcopy/COFF/COFFObjcopy.cpp:282
+    return createFileError(Config.InputFilename, O.takeError());
+  Object *Obj = O->get();
   assert(Obj && "Unable to deserialize COFF object");
----------------
This bit seems like unrelated renamings?
================
Comment at: llvm/tools/llvm-objcopy/COFF/Object.cpp:63
+  if (LastRemoved)
+    Symbols.erase(*LastRemoved, Symbols.end());
+
----------------
This implementation looks ok, but it's not entirely trivial - hopefully the tests cover all relevant cases here.
Does this happen to be similar to what the implementation of `std::remove_if` looks like?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88213/new/
https://reviews.llvm.org/D88213
    
    
More information about the llvm-commits
mailing list