[XRay] Make the FDRTraceWriter Endian-aware

Before this patch, the FDRTraceWriter would not take endianness into
account when writing data into the output stream.

This is a follow-up to D51289 and D51210.

llvm-svn: 341223
diff --git a/llvm/unittests/XRay/FDRTraceWriterTest.cpp b/llvm/unittests/XRay/FDRTraceWriterTest.cpp
index 97a0119..cbe6346 100644
--- a/llvm/unittests/XRay/FDRTraceWriterTest.cpp
+++ b/llvm/unittests/XRay/FDRTraceWriterTest.cpp
@@ -56,7 +56,7 @@
   OS.flush();
 
   // Then from here we load the Trace file.
-  DataExtractor DE(Data, true, 8);
+  DataExtractor DE(Data, sys::IsLittleEndianHost, 8);
   auto TraceOrErr = loadTrace(DE, true);
   if (!TraceOrErr)
     FAIL() << TraceOrErr.takeError();
@@ -100,7 +100,7 @@
   OS.flush();
 
   // Then from here we load the Trace file.
-  DataExtractor DE(Data, true, 8);
+  DataExtractor DE(Data, sys::IsLittleEndianHost, 8);
   auto TraceOrErr = loadTrace(DE, true);
   if (!TraceOrErr)
     FAIL() << TraceOrErr.takeError();
@@ -160,7 +160,7 @@
   ASSERT_THAT(Data.size(), Eq(BufferSize + 32));
 
   // Then from here we load the Trace file.
-  DataExtractor DE(Data, true, 8);
+  DataExtractor DE(Data, sys::IsLittleEndianHost, 8);
   auto TraceOrErr = loadTrace(DE, true);
   if (!TraceOrErr)
     FAIL() << TraceOrErr.takeError();