Objective-C: Serialize "more than one decl" state of ObjCMethodList.
authorNico Weber <nicolasweber@gmx.de>
Sat, 27 Dec 2014 22:14:15 +0000 (22:14 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sat, 27 Dec 2014 22:14:15 +0000 (22:14 +0000)
commitff4b35e6e73ee97bd1437908ce657c62b8a179e5
tree1647c8f0c96367351bcec1d6f5623c2f615f27b0
parent6e3a582809efea34253dfdfd7327c89c3f9f4800
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.

llvm-svn: 224892
clang/include/clang/Sema/ObjCMethodList.h
clang/include/clang/Serialization/ASTBitCodes.h
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTReaderInternals.h
clang/lib/Serialization/ASTWriter.cpp
clang/test/SemaObjC/attr-deprecated-pch.m [new file with mode: 0644]