Remove the bitwise XOR operator from the Attributes class. Replace it with the equiva...
[oota-llvm.git] / include / llvm / AttributesImpl.h
1 //===-- AttributesImpl.h - Attributes Internals -----------------*- 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 various helper methods and classes used by LLVMContextImpl
11 // for creating and managing attributes.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_ATTRIBUTESIMPL_H
16 #define LLVM_ATTRIBUTESIMPL_H
17
18 #include "llvm/ADT/FoldingSet.h"
19
20 namespace llvm {
21
22 class Attributes;
23
24 class AttributesImpl : public FoldingSetNode {
25   friend class Attributes;
26   uint64_t Bits;                // FIXME: We will be expanding this.
27
28 public:
29   AttributesImpl(uint64_t bits) : Bits(bits) {}
30
31   bool hasAttribute(uint64_t A) const;
32
33   bool hasAttributes() const;
34   bool hasAttributes(const Attributes &A) const;
35
36   uint64_t getAlignment() const;
37   uint64_t getStackAlignment() const;
38
39   bool isEmptyOrSingleton() const;
40
41   static uint64_t getAttrMask(uint64_t Val);
42
43   void Profile(FoldingSetNodeID &ID) const {
44     Profile(ID, Bits);
45   }
46   static void Profile(FoldingSetNodeID &ID, uint64_t Bits) {
47     ID.AddInteger(Bits);
48   }
49 };
50
51 } // end llvm namespace
52
53 #endif