comparison gen/dwarftypes.cpp @ 1569:755abafbf25d

Push the context through StructType::get. Requires LLVM >= 78258. Also remove old #if's.
author Benjamin Kramer <benny.kra@gmail.com>
date Thu, 06 Aug 2009 01:47:39 +0200
parents 18ad5601dff7
children 8d086d552909
comparison
equal deleted inserted replaced
1568:a591aa6bd6dc 1569:755abafbf25d
21 using namespace llvm; 21 using namespace llvm;
22 // Type Definitions 22 // Type Definitions
23 std::vector<const Type*>StructTy_llvm_dbg_anchor_type_fields; 23 std::vector<const Type*>StructTy_llvm_dbg_anchor_type_fields;
24 StructTy_llvm_dbg_anchor_type_fields.push_back(IntegerType::get(32)); 24 StructTy_llvm_dbg_anchor_type_fields.push_back(IntegerType::get(32));
25 StructTy_llvm_dbg_anchor_type_fields.push_back(IntegerType::get(32)); 25 StructTy_llvm_dbg_anchor_type_fields.push_back(IntegerType::get(32));
26 StructType* StructTy_llvm_dbg_anchor_type = StructType::get(StructTy_llvm_dbg_anchor_type_fields, /*isPacked=*/false); 26 StructType* StructTy_llvm_dbg_anchor_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_anchor_type_fields, /*isPacked=*/false);
27 mod->addTypeName("llvm.dbg.anchor.type", StructTy_llvm_dbg_anchor_type); 27 mod->addTypeName("llvm.dbg.anchor.type", StructTy_llvm_dbg_anchor_type);
28 28
29 std::vector<const Type*>StructTy_llvm_dbg_basictype_type_fields; 29 std::vector<const Type*>StructTy_llvm_dbg_basictype_type_fields;
30 StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(32)); 30 StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(32));
31 std::vector<const Type*>StructTy_1_fields; 31 std::vector<const Type*>StructTy_1_fields;
32 StructType* StructTy_1 = StructType::get(StructTy_1_fields, /*isPacked=*/false); 32 StructType* StructTy_1 = StructType::get(mod->getContext(), StructTy_1_fields, /*isPacked=*/false);
33 33
34 PointerType* PointerTy_0 = PointerType::get(StructTy_1,0); 34 PointerType* PointerTy_0 = PointerType::get(StructTy_1,0);
35 35
36 StructTy_llvm_dbg_basictype_type_fields.push_back(PointerTy_0); 36 StructTy_llvm_dbg_basictype_type_fields.push_back(PointerTy_0);
37 PointerType* PointerTy_2 = PointerType::get(IntegerType::get(8),0); 37 PointerType* PointerTy_2 = PointerType::get(IntegerType::get(8),0);
42 StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(64)); 42 StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(64));
43 StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(64)); 43 StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(64));
44 StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(64)); 44 StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(64));
45 StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(32)); 45 StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(32));
46 StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(32)); 46 StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(32));
47 StructType* StructTy_llvm_dbg_basictype_type = StructType::get(StructTy_llvm_dbg_basictype_type_fields, /*isPacked=*/false); 47 StructType* StructTy_llvm_dbg_basictype_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_basictype_type_fields, /*isPacked=*/false);
48 mod->addTypeName("llvm.dbg.basictype.type", StructTy_llvm_dbg_basictype_type); 48 mod->addTypeName("llvm.dbg.basictype.type", StructTy_llvm_dbg_basictype_type);
49 49
50 std::vector<const Type*>StructTy_llvm_dbg_compile_unit_type_fields; 50 std::vector<const Type*>StructTy_llvm_dbg_compile_unit_type_fields;
51 StructTy_llvm_dbg_compile_unit_type_fields.push_back(IntegerType::get(32)); 51 StructTy_llvm_dbg_compile_unit_type_fields.push_back(IntegerType::get(32));
52 StructTy_llvm_dbg_compile_unit_type_fields.push_back(PointerTy_0); 52 StructTy_llvm_dbg_compile_unit_type_fields.push_back(PointerTy_0);
53 StructTy_llvm_dbg_compile_unit_type_fields.push_back(IntegerType::get(32)); 53 StructTy_llvm_dbg_compile_unit_type_fields.push_back(IntegerType::get(32));
54 StructTy_llvm_dbg_compile_unit_type_fields.push_back(PointerTy_2); 54 StructTy_llvm_dbg_compile_unit_type_fields.push_back(PointerTy_2);
55 StructTy_llvm_dbg_compile_unit_type_fields.push_back(PointerTy_2); 55 StructTy_llvm_dbg_compile_unit_type_fields.push_back(PointerTy_2);
56 StructTy_llvm_dbg_compile_unit_type_fields.push_back(PointerTy_2); 56 StructTy_llvm_dbg_compile_unit_type_fields.push_back(PointerTy_2);
57 StructType* StructTy_llvm_dbg_compile_unit_type = StructType::get(StructTy_llvm_dbg_compile_unit_type_fields, /*isPacked=*/false); 57 StructType* StructTy_llvm_dbg_compile_unit_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_compile_unit_type_fields, /*isPacked=*/false);
58 mod->addTypeName("llvm.dbg.compile_unit.type", StructTy_llvm_dbg_compile_unit_type); 58 mod->addTypeName("llvm.dbg.compile_unit.type", StructTy_llvm_dbg_compile_unit_type);
59 59
60 std::vector<const Type*>StructTy_llvm_dbg_compositetype_type_fields; 60 std::vector<const Type*>StructTy_llvm_dbg_compositetype_type_fields;
61 StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(32)); 61 StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(32));
62 StructTy_llvm_dbg_compositetype_type_fields.push_back(PointerTy_0); 62 StructTy_llvm_dbg_compositetype_type_fields.push_back(PointerTy_0);
67 StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(64)); 67 StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(64));
68 StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(64)); 68 StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(64));
69 StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(32)); 69 StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(32));
70 StructTy_llvm_dbg_compositetype_type_fields.push_back(PointerTy_0); 70 StructTy_llvm_dbg_compositetype_type_fields.push_back(PointerTy_0);
71 StructTy_llvm_dbg_compositetype_type_fields.push_back(PointerTy_0); 71 StructTy_llvm_dbg_compositetype_type_fields.push_back(PointerTy_0);
72 StructType* StructTy_llvm_dbg_compositetype_type = StructType::get(StructTy_llvm_dbg_compositetype_type_fields, /*isPacked=*/false); 72 StructType* StructTy_llvm_dbg_compositetype_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_compositetype_type_fields, /*isPacked=*/false);
73 mod->addTypeName("llvm.dbg.compositetype.type", StructTy_llvm_dbg_compositetype_type); 73 mod->addTypeName("llvm.dbg.compositetype.type", StructTy_llvm_dbg_compositetype_type);
74 74
75 std::vector<const Type*>StructTy_llvm_dbg_derivedtype_type_fields; 75 std::vector<const Type*>StructTy_llvm_dbg_derivedtype_type_fields;
76 StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(32)); 76 StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(32));
77 StructTy_llvm_dbg_derivedtype_type_fields.push_back(PointerTy_0); 77 StructTy_llvm_dbg_derivedtype_type_fields.push_back(PointerTy_0);
81 StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(64)); 81 StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(64));
82 StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(64)); 82 StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(64));
83 StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(64)); 83 StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(64));
84 StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(32)); 84 StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(32));
85 StructTy_llvm_dbg_derivedtype_type_fields.push_back(PointerTy_0); 85 StructTy_llvm_dbg_derivedtype_type_fields.push_back(PointerTy_0);
86 StructType* StructTy_llvm_dbg_derivedtype_type = StructType::get(StructTy_llvm_dbg_derivedtype_type_fields, /*isPacked=*/false); 86 StructType* StructTy_llvm_dbg_derivedtype_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_derivedtype_type_fields, /*isPacked=*/false);
87 mod->addTypeName("llvm.dbg.derivedtype.type", StructTy_llvm_dbg_derivedtype_type); 87 mod->addTypeName("llvm.dbg.derivedtype.type", StructTy_llvm_dbg_derivedtype_type);
88 88
89 std::vector<const Type*>StructTy_llvm_dbg_global_variable_type_fields; 89 std::vector<const Type*>StructTy_llvm_dbg_global_variable_type_fields;
90 StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(32)); 90 StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(32));
91 StructTy_llvm_dbg_global_variable_type_fields.push_back(PointerTy_0); 91 StructTy_llvm_dbg_global_variable_type_fields.push_back(PointerTy_0);
97 StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(32)); 97 StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(32));
98 StructTy_llvm_dbg_global_variable_type_fields.push_back(PointerTy_0); 98 StructTy_llvm_dbg_global_variable_type_fields.push_back(PointerTy_0);
99 StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(1)); 99 StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(1));
100 StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(1)); 100 StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(1));
101 StructTy_llvm_dbg_global_variable_type_fields.push_back(PointerTy_0); 101 StructTy_llvm_dbg_global_variable_type_fields.push_back(PointerTy_0);
102 StructType* StructTy_llvm_dbg_global_variable_type = StructType::get(StructTy_llvm_dbg_global_variable_type_fields, /*isPacked=*/false); 102 StructType* StructTy_llvm_dbg_global_variable_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_global_variable_type_fields, /*isPacked=*/false);
103 mod->addTypeName("llvm.dbg.global_variable.type", StructTy_llvm_dbg_global_variable_type); 103 mod->addTypeName("llvm.dbg.global_variable.type", StructTy_llvm_dbg_global_variable_type);
104 104
105 std::vector<const Type*>StructTy_llvm_dbg_subprogram_type_fields; 105 std::vector<const Type*>StructTy_llvm_dbg_subprogram_type_fields;
106 StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(32)); 106 StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(32));
107 StructTy_llvm_dbg_subprogram_type_fields.push_back(PointerTy_0); 107 StructTy_llvm_dbg_subprogram_type_fields.push_back(PointerTy_0);
112 StructTy_llvm_dbg_subprogram_type_fields.push_back(PointerTy_0); 112 StructTy_llvm_dbg_subprogram_type_fields.push_back(PointerTy_0);
113 StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(32)); 113 StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(32));
114 StructTy_llvm_dbg_subprogram_type_fields.push_back(PointerTy_0); 114 StructTy_llvm_dbg_subprogram_type_fields.push_back(PointerTy_0);
115 StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(1)); 115 StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(1));
116 StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(1)); 116 StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(1));
117 StructType* StructTy_llvm_dbg_subprogram_type = StructType::get(StructTy_llvm_dbg_subprogram_type_fields, /*isPacked=*/false); 117 StructType* StructTy_llvm_dbg_subprogram_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_subprogram_type_fields, /*isPacked=*/false);
118 mod->addTypeName("llvm.dbg.subprogram.type", StructTy_llvm_dbg_subprogram_type); 118 mod->addTypeName("llvm.dbg.subprogram.type", StructTy_llvm_dbg_subprogram_type);
119 119
120 std::vector<const Type*>StructTy_llvm_dbg_variable_type_fields; 120 std::vector<const Type*>StructTy_llvm_dbg_variable_type_fields;
121 StructTy_llvm_dbg_variable_type_fields.push_back(IntegerType::get(32)); 121 StructTy_llvm_dbg_variable_type_fields.push_back(IntegerType::get(32));
122 StructTy_llvm_dbg_variable_type_fields.push_back(PointerTy_0); 122 StructTy_llvm_dbg_variable_type_fields.push_back(PointerTy_0);
123 StructTy_llvm_dbg_variable_type_fields.push_back(PointerTy_2); 123 StructTy_llvm_dbg_variable_type_fields.push_back(PointerTy_2);
124 StructTy_llvm_dbg_variable_type_fields.push_back(PointerTy_0); 124 StructTy_llvm_dbg_variable_type_fields.push_back(PointerTy_0);
125 StructTy_llvm_dbg_variable_type_fields.push_back(IntegerType::get(32)); 125 StructTy_llvm_dbg_variable_type_fields.push_back(IntegerType::get(32));
126 StructTy_llvm_dbg_variable_type_fields.push_back(PointerTy_0); 126 StructTy_llvm_dbg_variable_type_fields.push_back(PointerTy_0);
127 StructType* StructTy_llvm_dbg_variable_type = StructType::get(StructTy_llvm_dbg_variable_type_fields, /*isPacked=*/false); 127 StructType* StructTy_llvm_dbg_variable_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_variable_type_fields, /*isPacked=*/false);
128 mod->addTypeName("llvm.dbg.variable.type", StructTy_llvm_dbg_variable_type); 128 mod->addTypeName("llvm.dbg.variable.type", StructTy_llvm_dbg_variable_type);
129 129
130 std::vector<const Type*>FuncTy_3_args; 130 std::vector<const Type*>FuncTy_3_args;
131 FuncTy_3_args.push_back(PointerTy_0); 131 FuncTy_3_args.push_back(PointerTy_0);
132 FunctionType* FuncTy_3 = FunctionType::get( 132 FunctionType* FuncTy_3 = FunctionType::get(