]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/llvm/tools/clang/include/clang/Sema/ObjCMethodList.h
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / llvm / tools / clang / include / clang / Sema / ObjCMethodList.h
1 //===--- ObjCMethodList.h - A singly linked list of methods -----*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines ObjCMethodList, a singly-linked list of methods.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_CLANG_SEMA_OBJC_METHOD_LIST_H
15 #define LLVM_CLANG_SEMA_OBJC_METHOD_LIST_H
16
17 #include "llvm/ADT/PointerIntPair.h"
18
19 namespace clang {
20
21 class ObjCMethodDecl;
22
23 /// ObjCMethodList - a linked list of methods with different signatures.
24 struct ObjCMethodList {
25   ObjCMethodDecl *Method;
26   /// \brief The next list object and 2 bits for extra info.
27   llvm::PointerIntPair<ObjCMethodList *, 2> NextAndExtraBits;
28
29   ObjCMethodList() : Method(0) { }
30   ObjCMethodList(ObjCMethodDecl *M, ObjCMethodList *C)
31     : Method(M), NextAndExtraBits(C, 0) { }
32
33   ObjCMethodList *getNext() const { return NextAndExtraBits.getPointer(); }
34   unsigned getBits() const { return NextAndExtraBits.getInt(); }
35   void setNext(ObjCMethodList *L) { NextAndExtraBits.setPointer(L); }
36   void setBits(unsigned B) { NextAndExtraBits.setInt(B); }
37 };
38
39 }
40
41 #endif