[PATCH] D68935: [LLD] [COFF] Wrap file location pair<StringRef,int> in Optional<>. NFC.
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 14:21:54 PDT 2019
rnk added inline comments.
================
Comment at: lld/COFF/PDB.cpp:1818
exitOnErr(getFileName(cVStrTab, checksums, *nameIndex));
- return {filename, *lineNumber};
+ return std::pair<StringRef, uint32_t>{filename, *lineNumber};
}
----------------
mstorsjo wrote:
> MaskRay wrote:
> > `return {{filename, *lineNumber}};` works (but I am not sure whether others like it)
> Ah, that looks totally fine to me, and is nicely compact. `std::make_pair()` works as well, allowing omitting the template parameters.
I like either make_pair or double braces, as long we don't have to write the template arguments.
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68935/new/
https://reviews.llvm.org/D68935
More information about the llvm-commits
mailing list