[PATCH] D92734: [lld/mac] Make X86_64::getImplicitAddend not do heap allocations

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 7 06:24:19 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGfeadc3798d9a: [lld/mac] Make X86_64::getImplicitAddend not do heap allocations (authored by thakis).
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92734/new/

https://reviews.llvm.org/D92734

Files:
  lld/MachO/Arch/X86_64.cpp


Index: lld/MachO/Arch/X86_64.cpp
===================================================================
--- lld/MachO/Arch/X86_64.cpp
+++ lld/MachO/Arch/X86_64.cpp
@@ -52,9 +52,8 @@
 
 static void validateLength(MemoryBufferRef mb, const section_64 &sec,
                            const relocation_info &rel,
-                           const std::vector<uint8_t> &validLengths) {
-  if (std::find(validLengths.begin(), validLengths.end(), rel.r_length) !=
-      validLengths.end())
+                           ArrayRef<uint8_t> validLengths) {
+  if (find(validLengths, rel.r_length) != validLengths.end())
     return;
 
   std::string msg = getErrorLocation(mb, sec, rel) + ": relocations of type " +


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92734.309898.patch
Type: text/x-patch
Size: 704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201207/b89fdfcc/attachment.bin>


More information about the llvm-commits mailing list