Home | History | Annotate | Download | only in IR
      1 //===- llvm/IR/DebugInfoFlags.def - Debug info flag definitions -*- 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 // Macros for running through debug info flags.
     11 //
     12 //===----------------------------------------------------------------------===//
     13 
     14 // TODO: Add other DW-based macros.
     15 #ifndef HANDLE_DI_FLAG
     16 #error "Missing macro definition of HANDLE_DI_FLAG"
     17 #endif
     18 
     19 HANDLE_DI_FLAG(0, Zero) // Use it as zero value.
     20                         // For example: void foo(DIFlags Flags = FlagZero).
     21 HANDLE_DI_FLAG(1, Private)
     22 HANDLE_DI_FLAG(2, Protected)
     23 HANDLE_DI_FLAG(3, Public)
     24 HANDLE_DI_FLAG((1 << 2), FwdDecl)
     25 HANDLE_DI_FLAG((1 << 3), AppleBlock)
     26 HANDLE_DI_FLAG((1 << 4), BlockByrefStruct)
     27 HANDLE_DI_FLAG((1 << 5), Virtual)
     28 HANDLE_DI_FLAG((1 << 6), Artificial)
     29 HANDLE_DI_FLAG((1 << 7), Explicit)
     30 HANDLE_DI_FLAG((1 << 8), Prototyped)
     31 HANDLE_DI_FLAG((1 << 9), ObjcClassComplete)
     32 HANDLE_DI_FLAG((1 << 10), ObjectPointer)
     33 HANDLE_DI_FLAG((1 << 11), Vector)
     34 HANDLE_DI_FLAG((1 << 12), StaticMember)
     35 HANDLE_DI_FLAG((1 << 13), LValueReference)
     36 HANDLE_DI_FLAG((1 << 14), RValueReference)
     37 // 15 was formerly ExternalTypeRef, but this was never used.
     38 HANDLE_DI_FLAG((1 << 15), Reserved)
     39 HANDLE_DI_FLAG((1 << 16), SingleInheritance)
     40 HANDLE_DI_FLAG((2 << 16), MultipleInheritance)
     41 HANDLE_DI_FLAG((3 << 16), VirtualInheritance)
     42 HANDLE_DI_FLAG((1 << 18), IntroducedVirtual)
     43 HANDLE_DI_FLAG((1 << 19), BitField)
     44 HANDLE_DI_FLAG((1 << 20), NoReturn)
     45 HANDLE_DI_FLAG((1 << 21), MainSubprogram)
     46 
     47 // To avoid needing a dedicated value for IndirectVirtualBase, we use
     48 // the bitwise or of Virtual and FwdDecl, which does not otherwise
     49 // make sense for inheritance.
     50 HANDLE_DI_FLAG((1 << 2) | (1 << 5), IndirectVirtualBase)
     51 
     52 #ifdef DI_FLAG_LARGEST_NEEDED
     53 // intended to be used with ADT/BitmaskEnum.h
     54 // NOTE: always must be equal to largest flag, check this when adding new flag
     55 HANDLE_DI_FLAG((1 << 21), Largest)
     56 #undef DI_FLAG_LARGEST_NEEDED
     57 #endif
     58 
     59 #undef HANDLE_DI_FLAG
     60