summaryrefslogtreecommitdiffstats
path: root/include/clang/Sema/ObjCMethodList.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Sema/ObjCMethodList.h')
-rw-r--r--include/clang/Sema/ObjCMethodList.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/include/clang/Sema/ObjCMethodList.h b/include/clang/Sema/ObjCMethodList.h
index 225c137..94e3807 100644
--- a/include/clang/Sema/ObjCMethodList.h
+++ b/include/clang/Sema/ObjCMethodList.h
@@ -14,6 +14,8 @@
#ifndef LLVM_CLANG_SEMA_OBJC_METHOD_LIST_H
#define LLVM_CLANG_SEMA_OBJC_METHOD_LIST_H
+#include "llvm/ADT/PointerIntPair.h"
+
namespace clang {
class ObjCMethodDecl;
@@ -21,16 +23,17 @@ class ObjCMethodDecl;
/// ObjCMethodList - a linked list of methods with different signatures.
struct ObjCMethodList {
ObjCMethodDecl *Method;
- ObjCMethodList *Next;
-
- ObjCMethodList() {
- Method = 0;
- Next = 0;
- }
- ObjCMethodList(ObjCMethodDecl *M, ObjCMethodList *C) {
- Method = M;
- Next = C;
- }
+ /// \brief The next list object and 2 bits for extra info.
+ llvm::PointerIntPair<ObjCMethodList *, 2> NextAndExtraBits;
+
+ ObjCMethodList() : Method(0) { }
+ ObjCMethodList(ObjCMethodDecl *M, ObjCMethodList *C)
+ : Method(M), NextAndExtraBits(C, 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); }
};
}
OpenPOWER on IntegriCloud