[llvm] r346304 - [XRay] Use explicit string conversion
Dean Michael Berris via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 7 03:44:00 PST 2018
Author: dberris
Date: Wed Nov 7 03:44:00 2018
New Revision: 346304
URL: http://llvm.org/viewvc/llvm-project?rev=346304&view=rev
Log:
[XRay] Use explicit string conversion
Instead of using std::copy(...), use a conversion to string instead from
StringRef to std::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=346304&r1=346303&r2=346304&view=diff
==============================================================================
--- llvm/trunk/lib/XRay/FDRTraceExpander.cpp (original)
+++ llvm/trunk/lib/XRay/FDRTraceExpander.cpp Wed Nov 7 03:44:00 2018
@@ -45,8 +45,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();
More information about the llvm-commits
mailing list