Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions llvm/include/llvm/CodeGen/MachineInstr.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ class MachineInstr
HasHeapAllocMarker, HasPCSections, HasCFIType, HasMMRAs);

// Copy the actual data into the trailing objects.
std::copy(MMOs.begin(), MMOs.end(),
Result->getTrailingObjects<MachineMemOperand *>());
llvm::copy(MMOs, Result->getTrailingObjects<MachineMemOperand *>());

unsigned MDNodeIdx = 0;

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/RegAllocPBQP.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class AllowedRegVector {

AllowedRegVector(const std::vector<MCRegister> &OptVec)
: NumOpts(OptVec.size()), Opts(new MCRegister[NumOpts]) {
std::copy(OptVec.begin(), OptVec.end(), Opts.get());
llvm::copy(OptVec, Opts.get());
}

unsigned size() const { return NumOpts; }
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/IR/PredIteratorCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class PredIteratorCache {

SmallVector<BasicBlock *, 32> PredCache(predecessors(BB));
BasicBlock **Data = Memory.Allocate<BasicBlock *>(PredCache.size());
std::copy(PredCache.begin(), PredCache.end(), Data);
llvm::copy(PredCache, Data);
Entry = ArrayRef(Data, PredCache.size());
return Entry;
}
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/ObjCopy/COFF/COFFObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct Section {
struct AuxSymbol {
AuxSymbol(ArrayRef<uint8_t> In) {
assert(In.size() == sizeof(Opaque));
std::copy(In.begin(), In.end(), Opaque);
llvm::copy(In, Opaque);
}

ArrayRef<uint8_t> getRef() const {
Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ static Error dumpSectionToFile(StringRef SecName, StringRef Filename,
if (!BufferOrErr)
return createFileError(Filename, BufferOrErr.takeError());
std::unique_ptr<FileOutputBuffer> Buf = std::move(*BufferOrErr);
std::copy(Sec.OriginalData.begin(), Sec.OriginalData.end(),
Buf->getBufferStart());
llvm::copy(Sec.OriginalData, Buf->getBufferStart());
if (Error E = Buf->commit())
return createFileError(Filename, std::move(E));
return Error::success();
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/ObjCopy/ELF/ELFObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ Error ELFSectionWriter<ELFT>::visit(const CompressedSection &Sec) {
Elf_Chdr_Impl<ELFT> Chdr = {};
switch (Sec.CompressionType) {
case DebugCompressionType::None:
std::copy(Sec.OriginalData.begin(), Sec.OriginalData.end(), Buf);
llvm::copy(Sec.OriginalData, Buf);
return Error::success();
case DebugCompressionType::Zlib:
Chdr.ch_type = ELF::ELFCOMPRESS_ZLIB;
Expand All @@ -550,7 +550,7 @@ Error ELFSectionWriter<ELFT>::visit(const CompressedSection &Sec) {
memcpy(Buf, &Chdr, sizeof(Chdr));
Buf += sizeof(Chdr);

std::copy(Sec.CompressedData.begin(), Sec.CompressedData.end(), Buf);
llvm::copy(Sec.CompressedData, Buf);
return Error::success();
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Object/COFFImportFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static void writeStringTable(std::vector<uint8_t> &B,

for (const auto &S : Strings) {
B.resize(Pos + S.length() + 1);
std::copy(S.begin(), S.end(), std::next(B.begin(), Pos));
llvm::copy(S, std::next(B.begin(), Pos));
B[Pos + S.length()] = 0;
Pos += S.length() + 1;
}
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/ObjectYAML/COFFEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ struct COFFParser {
// store it in the string table.
StringRef Name = Sym.Name;
if (Name.size() <= COFF::NameSize) {
std::copy(Name.begin(), Name.end(), Sym.Header.Name);
llvm::copy(Name, Sym.Header.Name);
} else {
// Add string to the string table and format the index for output.
unsigned Index = getStringIndex(Name);
Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1232,8 +1232,7 @@ loadBinaryFormat(std::unique_ptr<Binary> Bin, StringRef Arch,
if (!CoverageRecordsOrErr)
return CoverageRecordsOrErr.takeError();
const auto &CoverageRecords = CoverageRecordsOrErr.get();
FuncRecordsBuffer = std::copy(CoverageRecords.begin(),
CoverageRecords.end(), FuncRecordsBuffer);
FuncRecordsBuffer = llvm::copy(CoverageRecords, FuncRecordsBuffer);
FuncRecordsBuffer =
std::fill_n(FuncRecordsBuffer,
alignAddr(FuncRecordsBuffer, RecordAlignment) -
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Support/Mustache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static Accessor splitMustacheString(StringRef Str, MustacheContext &Ctx) {
// Now, allocate memory for the array of StringRefs in the arena.
StringRef *ArenaTokens = Ctx.Allocator.Allocate<StringRef>(Tokens.size());
// Copy the StringRefs from the stack vector to the arena.
std::copy(Tokens.begin(), Tokens.end(), ArenaTokens);
llvm::copy(Tokens, ArenaTokens);
// Return an ArrayRef pointing to the stable arena memory.
return ArrayRef<StringRef>(ArenaTokens, Tokens.size());
}
Expand Down
8 changes: 4 additions & 4 deletions llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,8 @@ ArrayRef<int> hi(ArrayRef<int> Vuu) { return Vuu.take_back(Vuu.size() / 2); }
MaskT vshuffvdd(ArrayRef<int> Vu, ArrayRef<int> Vv, unsigned Rt) {
int Len = Vu.size();
MaskT Vdd(2 * Len);
std::copy(Vv.begin(), Vv.end(), Vdd.begin());
std::copy(Vu.begin(), Vu.end(), Vdd.begin() + Len);
llvm::copy(Vv, Vdd.begin());
llvm::copy(Vu, Vdd.begin() + Len);

auto Vd0 = MutableArrayRef<int>(Vdd).take_front(Len);
auto Vd1 = MutableArrayRef<int>(Vdd).take_back(Len);
Expand All @@ -831,8 +831,8 @@ MaskT vshuffvdd(ArrayRef<int> Vu, ArrayRef<int> Vv, unsigned Rt) {
MaskT vdealvdd(ArrayRef<int> Vu, ArrayRef<int> Vv, unsigned Rt) {
int Len = Vu.size();
MaskT Vdd(2 * Len);
std::copy(Vv.begin(), Vv.end(), Vdd.begin());
std::copy(Vu.begin(), Vu.end(), Vdd.begin() + Len);
llvm::copy(Vv, Vdd.begin());
llvm::copy(Vu, Vdd.begin() + Len);

auto Vd0 = MutableArrayRef<int>(Vdd).take_front(Len);
auto Vd1 = MutableArrayRef<int>(Vdd).take_back(Len);
Expand Down
6 changes: 3 additions & 3 deletions llvm/tools/lli/lli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1228,15 +1228,15 @@ static Expected<std::unique_ptr<orc::ExecutorProcessControl>> launchRemote() {
std::unique_ptr<char[]> ChildPath, ChildIn, ChildOut;
{
ChildPath.reset(new char[ChildExecPath.size() + 1]);
std::copy(ChildExecPath.begin(), ChildExecPath.end(), &ChildPath[0]);
llvm::copy(ChildExecPath, &ChildPath[0]);
ChildPath[ChildExecPath.size()] = '\0';
std::string ChildInStr = utostr(PipeFD[0][0]);
ChildIn.reset(new char[ChildInStr.size() + 1]);
std::copy(ChildInStr.begin(), ChildInStr.end(), &ChildIn[0]);
llvm::copy(ChildInStr, &ChildIn[0]);
ChildIn[ChildInStr.size()] = '\0';
std::string ChildOutStr = utostr(PipeFD[1][1]);
ChildOut.reset(new char[ChildOutStr.size() + 1]);
std::copy(ChildOutStr.begin(), ChildOutStr.end(), &ChildOut[0]);
llvm::copy(ChildOutStr, &ChildOut[0]);
ChildOut[ChildOutStr.size()] = '\0';
}

Expand Down
3 changes: 1 addition & 2 deletions llvm/tools/llvm-readobj/COFFDumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2330,8 +2330,7 @@ void COFFDumper::printResourceDirectoryTable(
std::vector<UTF16> EndianCorrectedNameString;
if (llvm::sys::IsBigEndianHost) {
EndianCorrectedNameString.resize(RawEntryNameString.size() + 1);
std::copy(RawEntryNameString.begin(), RawEntryNameString.end(),
EndianCorrectedNameString.begin() + 1);
llvm::copy(RawEntryNameString, EndianCorrectedNameString.begin() + 1);
EndianCorrectedNameString[0] = UNI_UTF16_BYTE_ORDER_MARK_SWAPPED;
RawEntryNameString = ArrayRef(EndianCorrectedNameString);
}
Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/Object/ELFTypesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ template <class ELFT> struct NoteTestData {
Nhdr->n_type = Type;

auto NameOffset = Data.begin() + sizeof(*Nhdr);
std::copy(Name.begin(), Name.end(), NameOffset);
llvm::copy(Name, NameOffset);

auto DescOffset =
Data.begin() + alignTo(sizeof(*Nhdr) + Nhdr->n_namesz, Align);
Expand Down
4 changes: 2 additions & 2 deletions llvm/unittests/Support/Path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ TEST_F(FileSystemTest, FileMapping) {
fs::mapped_file_region mfr(fs::convertFDToNativeFile(FileDescriptor),
fs::mapped_file_region::readwrite, Size, 0, EC);
ASSERT_NO_ERROR(EC);
std::copy(Val.begin(), Val.end(), mfr.data());
llvm::copy(Val, mfr.data());
// Explicitly add a 0.
mfr.data()[Val.size()] = 0;

Expand Down Expand Up @@ -1494,7 +1494,7 @@ TEST_F(FileSystemTest, FileMappingSync) {

// Write content through mapped memory.
ASSERT_NO_ERROR(EC);
std::copy(Content.begin(), Content.end(), MFR.data());
llvm::copy(Content, MFR.data());

// Synchronize to file system.
ASSERT_FALSE((bool)MFR.sync());
Expand Down
Loading