[llvm] r272369 - Add support for writing through StreamInterface.

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 11:44:00 PDT 2016



Zachary Turner wrote:

>This adds method and tests for writing to a PDB stream.  With
>this, even a PDB stream which is discontiguous can be treated
>as a sequential stream of bytes for the purposes of writing.

>  Reader.setOffset(0);
>  Writer.setOffset(0);
>  ::memset(DataBytes.data(), 0, 10);
>  EXPECT_NO_ERROR(Writer.writeArray(intArray[0]));
>  EXPECT_NO_ERROR(Reader.readArray(intArray[1], intArray[0].size()));
>  EXPECT_EQ(intArray[0], intArray[1]);
>  EXPECT_EQ(DataBytes, std::vector<uint8_t>({0x17, 0x5C, 0x50, 0x7A, 0xC2,
0xBB,
>                                             0x35, 0x01, 0, 0}));

This new unit test has been failing on SystemZ ever since it was added.
It seems the test is simply incorrect for big-endian systems ...


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand | Phone: +49-7031/16-3727
  STSM, GNU/Linux compilers and toolchain
  IBM Deutschland Research & Development GmbH
  Vorsitzende des Aufsichtsrats: Martina Koederitz | Geschäftsführung: Dirk
Wittkopp
  Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht
Stuttgart, HRB 243294
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160610/20446f17/attachment.html>


More information about the llvm-commits mailing list