"Fossies" - the Fresh Open Source Software Archive

Member "ponyc-0.33.2/src/libponyc/codegen/gendebug.h" (3 Feb 2020, 4736 Bytes) of package /linux/misc/ponyc-0.33.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "gendebug.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 0.33.1_vs_0.33.2.

    1 #ifndef CODEGEN_GENDEBUG_H
    2 #define CODEGEN_GENDEBUG_H
    3 
    4 #include <platform.h>
    5 #include <llvm-c/Core.h>
    6 #if PONY_LLVM >= 600
    7 #include <llvm-c/DebugInfo.h>
    8 #endif
    9 
   10 PONY_EXTERN_C_BEGIN
   11 
   12 enum
   13 {
   14   DW_ATE_boolean = 0x02,
   15   DW_ATE_float = 0x04,
   16   DW_ATE_signed = 0x05,
   17   DW_ATE_unsigned = 0x07,
   18 };
   19 
   20 enum
   21 {
   22   DW_FLAG_Private           = 1,
   23   DW_FLAG_Protected         = 2,
   24   DW_FLAG_Public            = 3,
   25   DW_FLAG_FwdDecl           = 1 << 2,
   26   DW_FLAG_AppleBlock        = 1 << 3,
   27   DW_FLAG_BlockByrefStruct  = 1 << 4,
   28   DW_FLAG_Virtual           = 1 << 5,
   29   DW_FLAG_Artificial        = 1 << 6,
   30   DW_FLAG_Explicit          = 1 << 7,
   31   DW_FLAG_Prototyped        = 1 << 8,
   32   DW_FLAG_ObjcClassComplete = 1 << 9,
   33   DW_FLAG_ObjectPointer     = 1 << 10,
   34   DW_FLAG_Vector            = 1 << 11,
   35   DW_FLAG_StaticMember      = 1 << 12,
   36   DW_FLAG_LValueReference   = 1 << 13,
   37   DW_FLAG_RValueReference   = 1 << 14,
   38   DW_FLAG_ExternalTypeRef   = 1 << 15,
   39 };
   40 
   41 typedef struct LLVMOpaqueMetadata* LLVMMetadataRef;
   42 
   43 typedef struct LLVMOpaqueDIBuilder* LLVMDIBuilderRef;
   44 
   45 void LLVMMetadataReplaceAllUsesWith(LLVMMetadataRef md_old,
   46   LLVMMetadataRef md_new);
   47 
   48 LLVMDIBuilderRef LLVMNewDIBuilder(LLVMModuleRef m);
   49 
   50 void LLVMDIBuilderDestroy(LLVMDIBuilderRef d);
   51 
   52 #if PONY_LLVM < 600
   53 void LLVMDIBuilderFinalize(LLVMDIBuilderRef d);
   54 
   55 LLVMMetadataRef LLVMDIBuilderCreateCompileUnit(LLVMDIBuilderRef d,
   56   unsigned lang, const char* file, const char* dir, const char* producer,
   57   int optimized);
   58 
   59 LLVMMetadataRef LLVMDIBuilderCreateFile(LLVMDIBuilderRef d, const char* file);
   60 #endif
   61 
   62 LLVMMetadataRef LLVMDIBuilderCreateNamespace(LLVMDIBuilderRef d,
   63   LLVMMetadataRef scope, const char* name, LLVMMetadataRef file,
   64   unsigned line);
   65 
   66 LLVMMetadataRef LLVMDIBuilderCreateLexicalBlock(LLVMDIBuilderRef d,
   67   LLVMMetadataRef scope, LLVMMetadataRef file, unsigned line, unsigned col);
   68 
   69 LLVMMetadataRef LLVMDIBuilderCreateMethod(LLVMDIBuilderRef d,
   70   LLVMMetadataRef scope, const char* name, const char* linkage,
   71   LLVMMetadataRef file, unsigned line, LLVMMetadataRef type, LLVMValueRef func,
   72   int optimized);
   73 
   74 #if PONY_LLVM < 700
   75 LLVMMetadataRef LLVMDIBuilderCreateAutoVariable(LLVMDIBuilderRef d,
   76   LLVMMetadataRef scope, const char* name, LLVMMetadataRef file,
   77   unsigned line, LLVMMetadataRef type);
   78 
   79 LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(LLVMDIBuilderRef d,
   80   LLVMMetadataRef scope, const char* name, unsigned arg,
   81   LLVMMetadataRef file, unsigned line, LLVMMetadataRef type);
   82 #endif
   83 
   84 LLVMMetadataRef LLVMDIBuilderCreateArtificialVariable(LLVMDIBuilderRef d,
   85   LLVMMetadataRef scope, const char* name, unsigned arg,
   86   LLVMMetadataRef file, unsigned line, LLVMMetadataRef type);
   87 
   88 #if PONY_LLVM < 700
   89 LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef d,
   90   const char* name, uint64_t size_bits, uint64_t align_bits,
   91   unsigned encoding);
   92 
   93 LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef d,
   94   LLVMMetadataRef elem_type, uint64_t size_bits, uint64_t align_bits);
   95 #endif
   96 
   97 LLVMMetadataRef LLVMDIBuilderCreateArtificialType(LLVMDIBuilderRef d,
   98   LLVMMetadataRef type);
   99 
  100 #if PONY_LLVM < 700
  101 LLVMMetadataRef LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef d,
  102   LLVMMetadataRef file, LLVMMetadataRef param_types);
  103 
  104 LLVMMetadataRef LLVMDIBuilderCreateStructType(LLVMDIBuilderRef d,
  105   LLVMMetadataRef scope, const char* name, LLVMMetadataRef file,
  106   unsigned line, uint64_t size_bits, uint64_t align_bits,
  107   LLVMMetadataRef elem_types);
  108 #endif
  109 
  110 LLVMMetadataRef LLVMDIBuilderCreateReplaceableStruct(LLVMDIBuilderRef d,
  111   const char* name, LLVMMetadataRef scope, LLVMMetadataRef file,
  112   unsigned line);
  113 
  114 #if PONY_LLVM < 700
  115 LLVMMetadataRef LLVMDIBuilderCreateMemberType(LLVMDIBuilderRef d,
  116   LLVMMetadataRef scope, const char* name, LLVMMetadataRef file,
  117   unsigned line, uint64_t size_bits, uint64_t align_bits,
  118   uint64_t offset_bits, unsigned flags, LLVMMetadataRef type);
  119 
  120 LLVMMetadataRef LLVMDIBuilderCreateArrayType(LLVMDIBuilderRef d,
  121   uint64_t size_bits, uint64_t align_bits,
  122   LLVMMetadataRef elem_type, LLVMMetadataRef subscripts);
  123 #endif
  124 
  125 LLVMMetadataRef LLVMDIBuilderGetOrCreateArray(LLVMDIBuilderRef d,
  126   LLVMMetadataRef* data, size_t length);
  127 
  128 LLVMMetadataRef LLVMDIBuilderGetOrCreateTypeArray(LLVMDIBuilderRef d,
  129   LLVMMetadataRef* data, size_t length);
  130 
  131 LLVMMetadataRef LLVMDIBuilderCreateExpression(LLVMDIBuilderRef d,
  132   int64_t* addr, size_t length);
  133 
  134 LLVMValueRef LLVMDIBuilderInsertDeclare(LLVMDIBuilderRef d,
  135   LLVMValueRef value, LLVMMetadataRef info, LLVMMetadataRef expr,
  136   unsigned line, unsigned col, LLVMMetadataRef scope, LLVMBasicBlockRef block);
  137 
  138 #if PONY_LLVM < 900
  139 void LLVMSetCurrentDebugLocation2(LLVMBuilderRef b,
  140   unsigned line, unsigned col, LLVMMetadataRef scope);
  141 #endif
  142 
  143 PONY_EXTERN_C_END
  144 
  145 #endif