diff options
author | Nico Weber <nicolasweber@gmx.de> | 2014-12-27 22:14:15 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2014-12-27 22:14:15 +0000 |
commit | 7d12079f8a44de51f66f8aba058e7992d880f6fd (patch) | |
tree | 950ed39a0c79b102d296d517d8d172b4d3928d2f /lib/Serialization/ASTReaderInternals.h | |
parent | 9779b8e52798d9bbe9050f21c560689b8b3093ca (diff) |
Objective-C: Serialize "more than one decl" state of ObjCMethodList.
This fixes PR21587, what r221933 fixed for regular programs is now also
fixed for decls coming from PCH files.
Use another bit from the count/bits uint16_t for storing the "more than one
decl" bit. This reduces the number of bits for the count from 14 to 13.
The selector with the most overloads in Cocoa.h has ~55 overloads, so 13 bits
should still be plenty. Since this changes the meaning of a serialized bit
pattern, also increase clang::serialization::VERSION_MAJOR.
Storing the "more than one decl" state of only the first overload isn't quite
correct, but Sema::AreMultipleMethodsInGlobalPool() currently only looks at
the state of the first overload so it's good enough for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224892 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderInternals.h')
-rw-r--r-- | lib/Serialization/ASTReaderInternals.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Serialization/ASTReaderInternals.h b/lib/Serialization/ASTReaderInternals.h index 2f0d37e77c..d1b032b27a 100644 --- a/lib/Serialization/ASTReaderInternals.h +++ b/lib/Serialization/ASTReaderInternals.h @@ -156,6 +156,8 @@ public: SelectorID ID; unsigned InstanceBits; unsigned FactoryBits; + bool InstanceHasMoreThanOneDecl; + bool FactoryHasMoreThanOneDecl; SmallVector<ObjCMethodDecl *, 2> Instance; SmallVector<ObjCMethodDecl *, 2> Factory; }; |