[lld] r194721 - Use makeArrayRef(). No functionality change.

Rui Ueyama ruiu at google.com
Thu Nov 14 10:57:34 PST 2013


Author: ruiu
Date: Thu Nov 14 12:57:34 2013
New Revision: 194721

URL: http://llvm.org/viewvc/llvm-project?rev=194721&view=rev
Log:
Use makeArrayRef(). No functionality change.

Modified:
    lld/trunk/lib/ReaderWriter/MachO/StubAtoms_x86_64.hpp

Modified: lld/trunk/lib/ReaderWriter/MachO/StubAtoms_x86_64.hpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/StubAtoms_x86_64.hpp?rev=194721&r1=194720&r2=194721&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/StubAtoms_x86_64.hpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/StubAtoms_x86_64.hpp Thu Nov 14 12:57:34 2013
@@ -19,10 +19,11 @@
 
 #include "ReferenceKinds.h"
 
+using llvm::makeArrayRef;
+
 namespace lld {
 namespace mach_o {
 
-
 //
 // X86_64 Stub Atom created by the stubs pass.
 //
@@ -49,7 +50,7 @@ public:
     static const uint8_t instructions[] =
               { 0xFF, 0x25, 0x00, 0x00, 0x00, 0x00 }; // jmp *lazyPointer
     assert(sizeof(instructions) == this->size());
-    return ArrayRef<uint8_t>(instructions, sizeof(instructions));
+    return makeArrayRef(instructions);
   }
 
 };
@@ -86,7 +87,7 @@ public:
       0xFF, 0x25, 0x00, 0x00, 0x00, 0x00,         // jmp *binder(%rip)
       0x90 };                                     // nop
     assert(sizeof(instructions) == this->size());
-    return ArrayRef<uint8_t>(instructions, sizeof(instructions));
+    return makeArrayRef(instructions);
   }
 
 };
@@ -121,7 +122,7 @@ public:
               { 0x68, 0x00, 0x00, 0x00, 0x00,   // pushq $lazy-info-offset
                 0xE9, 0x00, 0x00, 0x00, 0x00 }; // jmp helperhelper
     assert(sizeof(instructions) == this->size());
-    return ArrayRef<uint8_t>(instructions, sizeof(instructions));
+    return makeArrayRef(instructions);
   }
 
 };
@@ -158,7 +159,7 @@ public:
   virtual ArrayRef<uint8_t> rawContent() const {
     static const uint8_t bytes[] =
                             { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
-    return ArrayRef<uint8_t>(bytes, 8);
+    return makeArrayRef(bytes);
   }
 };
 
@@ -196,7 +197,7 @@ public:
   virtual ArrayRef<uint8_t> rawContent() const {
     static const uint8_t bytes[] =
     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
-    return ArrayRef<uint8_t>(bytes, 8);
+    return makeArrayRef(bytes);
   }
 
 };





More information about the llvm-commits mailing list