[llvm] r305166 - [ADT] Suppress unused attribute warning in unit test
Francis Ricci via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 11 12:29:28 PDT 2017
Thanks for catching. Fixed as r305168
On Sun, Jun 11, 2017 at 3:11 PM, David Blaikie <dblaikie at gmail.com> wrote:
> There's a portable macro for this attribute in LLVM (probably something like
> LLVM_ATTRIBUTE_USED) you shuold use here - sorry I didn't mention it in the
> other code review!
>
> On Sun, Jun 11, 2017 at 11:52 AM Francis Ricci via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>>
>> Author: fjricci
>> Date: Sun Jun 11 13:52:25 2017
>> New Revision: 305166
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=305166&view=rev
>> Log:
>> [ADT] Suppress unused attribute warning in unit test
>>
>> Modified:
>> llvm/trunk/unittests/ADT/SmallVectorTest.cpp
>>
>> Modified: llvm/trunk/unittests/ADT/SmallVectorTest.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/SmallVectorTest.cpp?rev=305166&r1=305165&r2=305166&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/unittests/ADT/SmallVectorTest.cpp (original)
>> +++ llvm/trunk/unittests/ADT/SmallVectorTest.cpp Sun Jun 11 13:52:25 2017
>> @@ -444,11 +444,11 @@ TYPED_TEST(SmallVectorTest, AppendRepeat
>> SCOPED_TRACE("AppendRepeatedTest");
>>
>> struct output_iterator {
>> - typedef std::output_iterator_tag iterator_category;
>> - typedef int value_type;
>> - typedef int difference_type;
>> - typedef value_type *pointer;
>> - typedef value_type &reference;
>> + typedef __attribute__((used)) std::output_iterator_tag
>> iterator_category;
>> + typedef __attribute__((used)) int value_type;
>> + typedef __attribute__((used)) int difference_type;
>> + typedef __attribute__((used)) value_type *pointer;
>> + typedef __attribute__((used)) value_type &reference;
>> operator int() { return 2; }
>> operator Constructable() { return 7; }
>> };
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list