DebugInfoFlags.def 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. //===- llvm/IR/DebugInfoFlags.def - Debug info flag definitions -*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // Macros for running through debug info flags.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #if !(defined HANDLE_DI_FLAG || defined HANDLE_DISP_FLAG)
  13. #error "Missing macro definition of HANDLE_DI*"
  14. #endif
  15. #ifndef HANDLE_DI_FLAG
  16. #define HANDLE_DI_FLAG(ID, NAME)
  17. #endif
  18. #ifndef HANDLE_DISP_FLAG
  19. #define HANDLE_DISP_FLAG(ID, NAME)
  20. #endif
  21. // General flags kept in DINode.
  22. HANDLE_DI_FLAG(0, Zero) // Use it as zero value.
  23. // For example: void foo(DIFlags Flags = FlagZero).
  24. HANDLE_DI_FLAG(1, Private)
  25. HANDLE_DI_FLAG(2, Protected)
  26. HANDLE_DI_FLAG(3, Public)
  27. HANDLE_DI_FLAG((1 << 2), FwdDecl)
  28. HANDLE_DI_FLAG((1 << 3), AppleBlock)
  29. // Used to be BlockByRef, can be reused for anything except DICompositeType.
  30. HANDLE_DI_FLAG((1 << 4), ReservedBit4)
  31. HANDLE_DI_FLAG((1 << 5), Virtual)
  32. HANDLE_DI_FLAG((1 << 6), Artificial)
  33. HANDLE_DI_FLAG((1 << 7), Explicit)
  34. HANDLE_DI_FLAG((1 << 8), Prototyped)
  35. HANDLE_DI_FLAG((1 << 9), ObjcClassComplete)
  36. HANDLE_DI_FLAG((1 << 10), ObjectPointer)
  37. HANDLE_DI_FLAG((1 << 11), Vector)
  38. HANDLE_DI_FLAG((1 << 12), StaticMember)
  39. HANDLE_DI_FLAG((1 << 13), LValueReference)
  40. HANDLE_DI_FLAG((1 << 14), RValueReference)
  41. HANDLE_DI_FLAG((1 << 15), ExportSymbols)
  42. HANDLE_DI_FLAG((1 << 16), SingleInheritance)
  43. HANDLE_DI_FLAG((2 << 16), MultipleInheritance)
  44. HANDLE_DI_FLAG((3 << 16), VirtualInheritance)
  45. HANDLE_DI_FLAG((1 << 18), IntroducedVirtual)
  46. HANDLE_DI_FLAG((1 << 19), BitField)
  47. HANDLE_DI_FLAG((1 << 20), NoReturn)
  48. HANDLE_DI_FLAG((1 << 22), TypePassByValue)
  49. HANDLE_DI_FLAG((1 << 23), TypePassByReference)
  50. HANDLE_DI_FLAG((1 << 24), EnumClass)
  51. HANDLE_DI_FLAG((1 << 25), Thunk)
  52. HANDLE_DI_FLAG((1 << 26), NonTrivial)
  53. HANDLE_DI_FLAG((1 << 27), BigEndian)
  54. HANDLE_DI_FLAG((1 << 28), LittleEndian)
  55. HANDLE_DI_FLAG((1 << 29), AllCallsDescribed)
  56. // To avoid needing a dedicated value for IndirectVirtualBase, we use
  57. // the bitwise or of Virtual and FwdDecl, which does not otherwise
  58. // make sense for inheritance.
  59. HANDLE_DI_FLAG((1 << 2) | (1 << 5), IndirectVirtualBase)
  60. #ifdef DI_FLAG_LARGEST_NEEDED
  61. // intended to be used with ADT/BitmaskEnum.h
  62. // NOTE: always must be equal to largest flag, check this when adding new flag
  63. HANDLE_DI_FLAG((1 << 29), Largest)
  64. #undef DI_FLAG_LARGEST_NEEDED
  65. #endif
  66. // Subprogram-specific flags kept in DISubprogram.
  67. // Use this as a zero/initialization value.
  68. // For example: void foo(DISPFlags Flags = SPFlagZero).
  69. HANDLE_DISP_FLAG(0, Zero)
  70. // Virtuality is a two-bit enum field in the LSB of the word.
  71. // Values should match DW_VIRTUALITY_*.
  72. HANDLE_DISP_FLAG(1u, Virtual)
  73. HANDLE_DISP_FLAG(2u, PureVirtual)
  74. HANDLE_DISP_FLAG((1u << 2), LocalToUnit)
  75. HANDLE_DISP_FLAG((1u << 3), Definition)
  76. HANDLE_DISP_FLAG((1u << 4), Optimized)
  77. HANDLE_DISP_FLAG((1u << 5), Pure)
  78. HANDLE_DISP_FLAG((1u << 6), Elemental)
  79. HANDLE_DISP_FLAG((1u << 7), Recursive)
  80. HANDLE_DISP_FLAG((1u << 8), MainSubprogram)
  81. // May also utilize this Flag in future, when adding support
  82. // for defaulted functions
  83. HANDLE_DISP_FLAG((1u << 9), Deleted)
  84. HANDLE_DISP_FLAG((1u << 11), ObjCDirect)
  85. #ifdef DISP_FLAG_LARGEST_NEEDED
  86. // Intended to be used with ADT/BitmaskEnum.h.
  87. // NOTE: Always must be equal to largest flag, check this when adding new flags.
  88. HANDLE_DISP_FLAG((1 << 11), Largest)
  89. #undef DISP_FLAG_LARGEST_NEEDED
  90. #endif
  91. #undef HANDLE_DI_FLAG
  92. #undef HANDLE_DISP_FLAG