[PATCH] D53311: [llvm-objcopy] Introduce dispatch mechanism based on input type

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 23 15:52:18 PDT 2018


alexshap added inline comments.


================
Comment at: Object.cpp:1172
+  // since some compilers complain on ambiguous resolution.
+  Ehdr.e_phnum = ::llvm::size(Obj.segments());
   Ehdr.e_phoff = (Ehdr.e_phnum != 0) ? Obj.ProgramHdrSegment.Offset : 0;
----------------
MaskRay wrote:
> Does it need to use nested-name-specifier this way to search in the global namespace (when it does not need to disambiguate)? It is very uncommon in llvm code.
> 
> `::llvm::size` -> `llvm::size`
> 
> There may be a `size()` somewhere but `llvm::size` should be sufficient.
yes, llvm::size is sufficient


Repository:
  rL LLVM

https://reviews.llvm.org/D53311





More information about the llvm-commits mailing list