[llvm-commits] [lld] r167254 - /lld/trunk/lib/ReaderWriter/MachO/WriterMachO.cpp
Shankar Easwaran
shankare at codeaurora.org
Mon Nov 5 07:21:58 PST 2012
On 11/1/2012 4:44 PM, Nick Kledzik wrote:
>
>
> @@ -777,13 +777,13 @@
> // Add dylib load commands.
> for (const SharedLibraryAtom* shlibAtom : file.sharedLibrary() ) {
> StringRef installName = shlibAtom->loadName();
> - if ( dylibNamesToOrdinal.count(installName) == 0 ) {
> - uint32_t ord = dylibNamesToOrdinal.size();
> - dylibNamesToOrdinal[installName] = ord;
> + if ( _dylibNamesToOrdinal.count(installName) == 0 ) {
> + uint32_t ord = _dylibNamesToOrdinal.size();
> + _dylibNamesToOrdinal[installName] = ord;
> }
The variable ord is used only in this loop, you can possibly assign the
value directly, rather going through a temporary, ie
_dylibNamesToOrdinal[installName] = _dylibNamesToOrdinal.size();
Thanks
Shankar Easwaran
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
More information about the llvm-commits
mailing list