Skip to content

Commit

Permalink
[XRay] Clean up more std::copy(...)'s
Browse files Browse the repository at this point in the history
Update a couple more places to use conversion from StringRef to string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346306 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
deanberris committed Nov 7, 2018
1 parent d22ff25 commit b44657a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/XRay/FDRTraceExpander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ Error TraceExpander::visit(CustomEventRecordV5 &R) {
CurrentRecord.PId = PID;
CurrentRecord.TId = TID;
CurrentRecord.Type = RecordTypes::CUSTOM_EVENT;
std::copy(R.data().begin(), R.data().end(),
std::back_inserter(CurrentRecord.Data));
CurrentRecord.Data = R.data();
BuildingRecord = true;
}
return Error::success();
Expand All @@ -77,8 +76,7 @@ Error TraceExpander::visit(TypedEventRecord &R) {
CurrentRecord.TId = TID;
CurrentRecord.RecordType = R.eventType();
CurrentRecord.Type = RecordTypes::TYPED_EVENT;
std::copy(R.data().begin(), R.data().end(),
std::back_inserter(CurrentRecord.Data));
CurrentRecord.Data = R.data();
BuildingRecord = true;
}
return Error::success();
Expand Down

0 comments on commit b44657a

Please sign in to comment.