[llvm] r271397 - MappedBlockStreamTest.cpp: Appease msc18 to avoid initializer for std::vector.

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 1 16:06:13 PDT 2016


Sure. Updated in r271439. Sorry for my laziness.

On Thu, Jun 2, 2016 at 2:04 AM David Blaikie <dblaikie at gmail.com> wrote:

> On Wed, Jun 1, 2016 at 7:26 AM, NAKAMURA Takumi via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: chapuni
>> Date: Wed Jun  1 09:26:54 2016
>> New Revision: 271397
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=271397&view=rev
>> Log:
>> MappedBlockStreamTest.cpp: Appease msc18 to avoid initializer for
>> std::vector.
>>
>> 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=271397&r1=271396&r2=271397&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp
>> (original)
>> +++ llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp Wed Jun
>> 1 09:26:54 2016
>> @@ -37,11 +37,15 @@ namespace {
>>        consumeError(std::move(E));
>>       \
>>    }
>>
>> +static const uint32_t BlocksAry[] = {0, 1, 2, 5, 4, 3, 6, 7, 8, 9};
>> +static const char DataAry[] = {'A', 'B', 'C', 'F', 'E',
>> +                               'D', 'G', 'H', 'I', 'J'};
>> +
>>  class DiscontiguousFile : public IPDBFile {
>>  public:
>>    DiscontiguousFile()
>> -      : Blocks{0, 1, 2, 5, 4, 3, 6, 7, 8, 9},
>> -        Data{'A', 'B', 'C', 'F', 'E', 'D', 'G', 'H', 'I', 'J'} {}
>> +      : Blocks(&BlocksAry[0], &BlocksAry[10]), Data(&DataAry[0],
>> &DataAry[10]) {
>>
>
> Possibly use std::begin/end here (or at least llvm_arraylengthof?)?
>
>
>> +  }
>>
>>    virtual uint32_t getBlockSize() const override { return 1; }
>>    virtual uint32_t getBlockCount() const override { return 10; }
>>
>>
>> _______________________________________________
>> 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/20160601/841db56b/attachment.html>


More information about the llvm-commits mailing list