[llvm] r346306 - [XRay] Clean up more std::copy(...)'s
Dean Michael Berris via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 7 03:52:23 PST 2018
Author: dberris
Date: Wed Nov 7 03:52:22 2018
New Revision: 346306
URL: http://llvm.org/viewvc/llvm-project?rev=346306&view=rev
Log:
[XRay] Clean up more std::copy(...)'s
Update a couple more places to use conversion from StringRef to string.
Modified:
llvm/trunk/lib/XRay/FDRTraceExpander.cpp
Modified: llvm/trunk/lib/XRay/FDRTraceExpander.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/XRay/FDRTraceExpander.cpp?rev=346306&r1=346305&r2=346306&view=diff
==============================================================================
--- llvm/trunk/lib/XRay/FDRTraceExpander.cpp (original)
+++ llvm/trunk/lib/XRay/FDRTraceExpander.cpp Wed Nov 7 03:52:22 2018
@@ -60,8 +60,7 @@ Error TraceExpander::visit(CustomEventRe
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();
@@ -77,8 +76,7 @@ Error TraceExpander::visit(TypedEventRec
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();
More information about the llvm-commits
mailing list