[PATCH] D68935: [LLD] [COFF] Wrap file location pair<StringRef,int> in Optional<>. NFC.

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 00:20:05 PDT 2019


mstorsjo created this revision.
mstorsjo added reviewers: ruiu, rnk, MaskRay.
Herald added a project: LLVM.

IIRC this was requested in some earlier review touching this code.

It makes returning of None and checking for a failed response clearer, at the cost of more code elsewhere (creating a pair is as easy as `{"file", line}`, but with the Optional<pair<>> return type, it has to be returned as `pair<StringRef,int>{"file", line}`).

So I'm unusure if this is a worthy tradeoff in making the code easier or not.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D68935

Files:
  lld/COFF/PDB.cpp
  lld/COFF/PDB.h
  lld/COFF/SymbolTable.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68935.224814.patch
Type: text/x-patch
Size: 4617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191014/fa758736/attachment.bin>


More information about the llvm-commits mailing list