[llvm] r272457 - DebugInfoPDBTests:MappedBlockStreamTest.TestWriteThenRead: Avoid assigning temporary object to ArrayRef.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 11 04:34:37 PDT 2016


Thanks for catching this. Looks like the problem still exists with
intArray. I can fix it tomorrow unless you do it before that
On Fri, Jun 10, 2016 at 11:44 PM NAKAMURA Takumi via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: chapuni
> Date: Sat Jun 11 01:37:28 2016
> New Revision: 272457
>
> URL: http://llvm.org/viewvc/llvm-project?rev=272457&view=rev
> Log:
> DebugInfoPDBTests:MappedBlockStreamTest.TestWriteThenRead: Avoid assigning
> temporary object to ArrayRef.
>
> Modified:
>     llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp
>
> Modified: llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp?rev=272457&r1=272456&r2=272457&view=diff
>
> ==============================================================================
> --- llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp (original)
> +++ llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp Sat Jun
> 11 01:37:28 2016
> @@ -315,7 +315,9 @@ TEST(MappedBlockStreamTest, TestWriteThe
>    MyEnum Enum[] = {MyEnum::Val1, MyEnum::Val2};
>    StringRef ZStr[] = {"Zero Str", ""};
>    StringRef FStr[] = {"Fixed Str", ""};
> -  ArrayRef<uint8_t> byteArray[] = {{'1', '2'}, {'0', '0'}};
> +  uint8_t byteArray0[] = {'1', '2'};
> +  uint8_t byteArray1[] = {'0', '0'};
> +  ArrayRef<uint8_t> byteArray[] = {byteArray0, byteArray1};
>    ArrayRef<uint32_t> intArray[] = {{890723408, 29082234}, {0, 0}};
>
>    StreamReader Reader(S);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160611/0111cd53/attachment.html>


More information about the llvm-commits mailing list