summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/SmallVectorTest.cpp
diff options
context:
space:
mode:
authorFrancis Ricci <francisjricci@gmail.com>2017-06-12 14:19:25 +0000
committerFrancis Ricci <francisjricci@gmail.com>2017-06-12 14:19:25 +0000
commit41b4f1aa83c48a2573cec93864f95f60d36604bb (patch)
treea3e50e9b92fc761ffaa081c2445aca41236ff3de /llvm/unittests/ADT/SmallVectorTest.cpp
parent2531a5d8274dbe9bb46e71aa02aca7525515cff1 (diff)
downloadbcm5719-llvm-41b4f1aa83c48a2573cec93864f95f60d36604bb.tar.gz
bcm5719-llvm-41b4f1aa83c48a2573cec93864f95f60d36604bb.zip
[ADT] Don't use __used__ attribute on struct members in unit test
On some compilers, __used__ can only be applied to variables or functions. llvm-svn: 305188
Diffstat (limited to 'llvm/unittests/ADT/SmallVectorTest.cpp')
-rw-r--r--llvm/unittests/ADT/SmallVectorTest.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/unittests/ADT/SmallVectorTest.cpp b/llvm/unittests/ADT/SmallVectorTest.cpp
index bf81e6a1c8b..9c501bbdf1a 100644
--- a/llvm/unittests/ADT/SmallVectorTest.cpp
+++ b/llvm/unittests/ADT/SmallVectorTest.cpp
@@ -440,19 +440,19 @@ TYPED_TEST(SmallVectorTest, AppendNonIterTest) {
this->assertValuesInOrder(this->theVector, 3u, 1, 7, 7);
}
+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;
+ operator int() { return 2; }
+ operator Constructable() { return 7; }
+};
+
TYPED_TEST(SmallVectorTest, AppendRepeatedNonForwardIterator) {
SCOPED_TRACE("AppendRepeatedTest");
- struct output_iterator {
- typedef LLVM_ATTRIBUTE_USED std::output_iterator_tag iterator_category;
- typedef LLVM_ATTRIBUTE_USED int value_type;
- typedef LLVM_ATTRIBUTE_USED int difference_type;
- typedef LLVM_ATTRIBUTE_USED value_type *pointer;
- typedef LLVM_ATTRIBUTE_USED value_type &reference;
- operator int() { return 2; }
- operator Constructable() { return 7; }
- };
-
this->theVector.push_back(Constructable(1));
this->theVector.append(output_iterator(), output_iterator());
this->assertValuesInOrder(this->theVector, 3u, 1, 7, 7);
OpenPOWER on IntegriCloud