diff options
Diffstat (limited to 'tools/llvm-xray')
-rw-r--r-- | tools/llvm-xray/xray-converter.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/llvm-xray/xray-converter.cc b/tools/llvm-xray/xray-converter.cc index 96850f032bf..2583ec95149 100644 --- a/tools/llvm-xray/xray-converter.cc +++ b/tools/llvm-xray/xray-converter.cc @@ -118,7 +118,9 @@ void TraceConverter::exportAsRAWv1(const Trace &Records, raw_ostream &OS) { // format. for (const auto &R : Records) { Writer.write(R.RecordType); - Writer.write(R.CPU); + // The on disk naive raw format uses 8 bit CPUs, but the record has 16. + // There's no choice but truncation. + Writer.write(static_cast<uint8_t>(R.CPU)); switch (R.Type) { case RecordTypes::ENTER: Writer.write(uint8_t{0}); |