Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.3 KiB

  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. #ifndef LLVM_ATTRIBUTESIMPL_H
  15. #define LLVM_ATTRIBUTESIMPL_H
  16. #include "llvm/ADT/FoldingSet.h"
  17. namespace llvm {
  18. class Attributes;
  19. class AttributesImpl : public FoldingSetNode {
  20. friend class Attributes;
  21. uint64_t Bits; // FIXME: We will be expanding this.
  22. public:
  23. AttributesImpl(uint64_t bits) : Bits(bits) {}
  24. bool hasAttribute(uint64_t A) const;
  25. bool hasAttributes() const;
  26. bool hasAttributes(const Attributes &A) const;
  27. uint64_t getAlignment() const;
  28. uint64_t getStackAlignment() const;
  29. bool isEmptyOrSingleton() const;
  30. static uint64_t getAttrMask(uint64_t Val);
  31. void Profile(FoldingSetNodeID &ID) const {
  32. Profile(ID, Bits);
  33. }
  34. static void Profile(FoldingSetNodeID &ID, uint64_t Bits) {
  35. ID.AddInteger(Bits);
  36. }
  37. };
  38. } // end llvm namespace
  39. #endif