OSDN Git Service

[ADT] Use LLVM_ATTRIBUTE_USED instead of __attribute__ for unit test
authorFrancis Ricci <francisjricci@gmail.com>
Sun, 11 Jun 2017 19:28:21 +0000 (19:28 +0000)
committerFrancis Ricci <francisjricci@gmail.com>
Sun, 11 Jun 2017 19:28:21 +0000 (19:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305168 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/ADT/SmallVectorTest.cpp

index 89f7619..bf81e6a 100644 (file)
@@ -444,11 +444,11 @@ TYPED_TEST(SmallVectorTest, AppendRepeatedNonForwardIterator) {
   SCOPED_TRACE("AppendRepeatedTest");
 
   struct output_iterator {
-    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;
+    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; }
   };