]> granicus.if.org Git - clang/commitdiff
Try to make the buildbots green again: avoid the need for class Attr to be
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 16 May 2016 23:03:40 +0000 (23:03 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 16 May 2016 23:03:40 +0000 (23:03 +0000)
complete for users of AttrVec.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269720 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/AttrIterator.h

index b768e5636a2720eb1180e2f726a30f7d2c5f5659..52a8d8ddd39a81baef27d8f7a901e3b2ff79ec9b 100644 (file)
@@ -23,6 +23,13 @@ namespace clang {
   class Attr;
 }
 
+namespace llvm {
+  // Explicitly opt into 4 byte alignment for Attr*, to avoid the need to
+  // include the heavyweight Attr.h to use a TinyPtrVector<Attr*>.
+  template <>
+  struct PointerLikeTypeTraits<Attr *> : PointerLikeTypeTraits<void *> {};
+}
+
 // Defined in ASTContext.h
 void *operator new(size_t Bytes, const clang::ASTContext &C,
                    size_t Alignment = 8);