[llvm] r341042 - [XRay] Help gcc disambiguate names
Dean Michael Berris via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 30 02:04:12 PDT 2018
Author: dberris
Date: Thu Aug 30 02:04:12 2018
New Revision: 341042
URL: http://llvm.org/viewvc/llvm-project?rev=341042&view=rev
Log:
[XRay] Help gcc disambiguate names
Follow-up to D51210.
Modified:
llvm/trunk/lib/XRay/FDRTraceWriter.cpp
Modified: llvm/trunk/lib/XRay/FDRTraceWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/XRay/FDRTraceWriter.cpp?rev=341042&r1=341041&r2=341042&view=diff
==============================================================================
--- llvm/trunk/lib/XRay/FDRTraceWriter.cpp (original)
+++ llvm/trunk/lib/XRay/FDRTraceWriter.cpp Thu Aug 30 02:04:12 2018
@@ -64,12 +64,13 @@ template <size_t Index> struct IndexedMe
static void Copy(char *, Tuple &&) {}
};
-template <uint8_t Kind, class... Data>
-Error writeMetadata(raw_ostream &OS, Data&&... Ds) {
+template <uint8_t Kind, class... Values>
+Error writeMetadata(raw_ostream &OS, Values&&... Ds) {
MetadataBlob B;
B.Type = 1;
B.RecordKind = Kind;
- auto T = std::make_tuple(std::forward<Data>(std::move(Ds))...);
+ std::memset(B.Data, 0, 15);
+ auto T = std::make_tuple(std::forward<Values>(std::move(Ds))...);
IndexedMemcpy<0>::Copy(B.Data, T);
OS.write(reinterpret_cast<const char *>(&B), sizeof(MetadataBlob));
return Error::success();
More information about the llvm-commits
mailing list