1 //===-- AttributesImpl.h - Attributes Internals -----------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines various helper methods and classes used by LLVMContextImpl
11 // for creating and managing attributes.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_ATTRIBUTESIMPL_H
16 #define LLVM_ATTRIBUTESIMPL_H
18 #include "llvm/ADT/FoldingSet.h"
24 class AttributesImpl : public FoldingSetNode {
25 uint64_t Bits; // FIXME: We will be expanding this.
27 AttributesImpl(uint64_t bits) : Bits(bits) {}
29 bool hasAttribute(uint64_t A) const;
31 bool hasAttributes() const;
32 bool hasAttributes(const Attributes &A) const;
34 uint64_t getAlignment() const;
35 uint64_t getStackAlignment() const;
37 uint64_t Raw() const { return Bits; } // FIXME: Remove.
39 static uint64_t getAttrMask(uint64_t Val);
41 void Profile(FoldingSetNodeID &ID) const {
44 static void Profile(FoldingSetNodeID &ID, uint64_t Bits) {
49 } // end llvm namespace