aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Sema/ObjCMethodList.h
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2015-03-23 12:09:02 -0700
committerStephen Hines <srhines@google.com>2015-03-31 17:07:53 -0700
commit0e2c34f92f00628d48968dfea096d36381f494cb (patch)
tree03a142fc9174f13e1e3120853592c56778f14fe5 /include/clang/Sema/ObjCMethodList.h
parentf6595cb19f570efe109abe570c726ebd7afd3973 (diff)
downloadclang-0e2c34f92f00628d48968dfea096d36381f494cb.tar.gz
Update aosp/master clang for rebase to r230699.
Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
Diffstat (limited to 'include/clang/Sema/ObjCMethodList.h')
-rw-r--r--include/clang/Sema/ObjCMethodList.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/include/clang/Sema/ObjCMethodList.h b/include/clang/Sema/ObjCMethodList.h
index 956e0882c5..b618e38f88 100644
--- a/include/clang/Sema/ObjCMethodList.h
+++ b/include/clang/Sema/ObjCMethodList.h
@@ -20,22 +20,37 @@ namespace clang {
class ObjCMethodDecl;
-/// ObjCMethodList - a linked list of methods with different signatures.
+/// \brief a linked list of methods with the same selector name but different
+/// signatures.
struct ObjCMethodList {
- ObjCMethodDecl *Method;
- /// \brief count of methods with same signature.
- unsigned Count;
+ // NOTE: If you add any members to this struct, make sure to serialize them.
+ /// \brief If there is more than one decl with this signature.
+ llvm::PointerIntPair<ObjCMethodDecl *, 1> MethodAndHasMoreThanOneDecl;
/// \brief The next list object and 2 bits for extra info.
llvm::PointerIntPair<ObjCMethodList *, 2> NextAndExtraBits;
- ObjCMethodList() : Method(nullptr), Count(0) { }
- ObjCMethodList(ObjCMethodDecl *M, unsigned count, ObjCMethodList *C)
- : Method(M), Count(count), NextAndExtraBits(C, 0) { }
+ ObjCMethodList() { }
+ ObjCMethodList(ObjCMethodDecl *M)
+ : MethodAndHasMoreThanOneDecl(M, 0) {}
ObjCMethodList *getNext() const { return NextAndExtraBits.getPointer(); }
unsigned getBits() const { return NextAndExtraBits.getInt(); }
void setNext(ObjCMethodList *L) { NextAndExtraBits.setPointer(L); }
void setBits(unsigned B) { NextAndExtraBits.setInt(B); }
+
+ ObjCMethodDecl *getMethod() const {
+ return MethodAndHasMoreThanOneDecl.getPointer();
+ }
+ void setMethod(ObjCMethodDecl *M) {
+ return MethodAndHasMoreThanOneDecl.setPointer(M);
+ }
+
+ bool hasMoreThanOneDecl() const {
+ return MethodAndHasMoreThanOneDecl.getInt();
+ }
+ void setHasMoreThanOneDecl(bool B) {
+ return MethodAndHasMoreThanOneDecl.setInt(B);
+ }
};
}