diff gen/dwarftypes.cpp @ 1571:8d086d552909

IntegerType is now contextifed. Requires llvm >= 78969. resistor says this will be the last context API change :)
author Benjamin Kramer <benny.kra@gmail.com>
date Fri, 14 Aug 2009 00:39:18 +0200
parents 755abafbf25d
children
line wrap: on
line diff
--- a/gen/dwarftypes.cpp	Thu Aug 06 16:02:14 2009 +0200
+++ b/gen/dwarftypes.cpp	Fri Aug 14 00:39:18 2009 +0200
@@ -21,36 +21,36 @@
   using namespace llvm;
   // Type Definitions
   std::vector<const Type*>StructTy_llvm_dbg_anchor_type_fields;
-  StructTy_llvm_dbg_anchor_type_fields.push_back(IntegerType::get(32));
-  StructTy_llvm_dbg_anchor_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_anchor_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
+  StructTy_llvm_dbg_anchor_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   StructType* StructTy_llvm_dbg_anchor_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_anchor_type_fields, /*isPacked=*/false);
   mod->addTypeName("llvm.dbg.anchor.type", StructTy_llvm_dbg_anchor_type);
   
   std::vector<const Type*>StructTy_llvm_dbg_basictype_type_fields;
-  StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   std::vector<const Type*>StructTy_1_fields;
   StructType* StructTy_1 = StructType::get(mod->getContext(), StructTy_1_fields, /*isPacked=*/false);
   
   PointerType* PointerTy_0 = PointerType::get(StructTy_1,0);
   
   StructTy_llvm_dbg_basictype_type_fields.push_back(PointerTy_0);
-  PointerType* PointerTy_2 = PointerType::get(IntegerType::get(8),0);
+  PointerType* PointerTy_2 = PointerType::get(IntegerType::get(mod->getContext(), 8),0);
   
   StructTy_llvm_dbg_basictype_type_fields.push_back(PointerTy_2);
   StructTy_llvm_dbg_basictype_type_fields.push_back(PointerTy_0);
-  StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(32));
-  StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(64));
-  StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(64));
-  StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(64));
-  StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(32));
-  StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
+  StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(mod->getContext(), 64));
+  StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(mod->getContext(), 64));
+  StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(mod->getContext(), 64));
+  StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
+  StructTy_llvm_dbg_basictype_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   StructType* StructTy_llvm_dbg_basictype_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_basictype_type_fields, /*isPacked=*/false);
   mod->addTypeName("llvm.dbg.basictype.type", StructTy_llvm_dbg_basictype_type);
   
   std::vector<const Type*>StructTy_llvm_dbg_compile_unit_type_fields;
-  StructTy_llvm_dbg_compile_unit_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_compile_unit_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   StructTy_llvm_dbg_compile_unit_type_fields.push_back(PointerTy_0);
-  StructTy_llvm_dbg_compile_unit_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_compile_unit_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   StructTy_llvm_dbg_compile_unit_type_fields.push_back(PointerTy_2);
   StructTy_llvm_dbg_compile_unit_type_fields.push_back(PointerTy_2);
   StructTy_llvm_dbg_compile_unit_type_fields.push_back(PointerTy_2);
@@ -58,71 +58,71 @@
   mod->addTypeName("llvm.dbg.compile_unit.type", StructTy_llvm_dbg_compile_unit_type);
   
   std::vector<const Type*>StructTy_llvm_dbg_compositetype_type_fields;
-  StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   StructTy_llvm_dbg_compositetype_type_fields.push_back(PointerTy_0);
   StructTy_llvm_dbg_compositetype_type_fields.push_back(PointerTy_2);
   StructTy_llvm_dbg_compositetype_type_fields.push_back(PointerTy_0);
-  StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(32));
-  StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(64));
-  StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(64));
-  StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(64));
-  StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
+  StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(mod->getContext(), 64));
+  StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(mod->getContext(), 64));
+  StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(mod->getContext(), 64));
+  StructTy_llvm_dbg_compositetype_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   StructTy_llvm_dbg_compositetype_type_fields.push_back(PointerTy_0);
   StructTy_llvm_dbg_compositetype_type_fields.push_back(PointerTy_0);
   StructType* StructTy_llvm_dbg_compositetype_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_compositetype_type_fields, /*isPacked=*/false);
   mod->addTypeName("llvm.dbg.compositetype.type", StructTy_llvm_dbg_compositetype_type);
   
   std::vector<const Type*>StructTy_llvm_dbg_derivedtype_type_fields;
-  StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   StructTy_llvm_dbg_derivedtype_type_fields.push_back(PointerTy_0);
   StructTy_llvm_dbg_derivedtype_type_fields.push_back(PointerTy_2);
   StructTy_llvm_dbg_derivedtype_type_fields.push_back(PointerTy_0);
-  StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(32));
-  StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(64));
-  StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(64));
-  StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(64));
-  StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
+  StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(mod->getContext(), 64));
+  StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(mod->getContext(), 64));
+  StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(mod->getContext(), 64));
+  StructTy_llvm_dbg_derivedtype_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   StructTy_llvm_dbg_derivedtype_type_fields.push_back(PointerTy_0);
   StructType* StructTy_llvm_dbg_derivedtype_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_derivedtype_type_fields, /*isPacked=*/false);
   mod->addTypeName("llvm.dbg.derivedtype.type", StructTy_llvm_dbg_derivedtype_type);
   
   std::vector<const Type*>StructTy_llvm_dbg_global_variable_type_fields;
-  StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   StructTy_llvm_dbg_global_variable_type_fields.push_back(PointerTy_0);
   StructTy_llvm_dbg_global_variable_type_fields.push_back(PointerTy_0);
   StructTy_llvm_dbg_global_variable_type_fields.push_back(PointerTy_2);
   StructTy_llvm_dbg_global_variable_type_fields.push_back(PointerTy_2);
   StructTy_llvm_dbg_global_variable_type_fields.push_back(PointerTy_2);
   StructTy_llvm_dbg_global_variable_type_fields.push_back(PointerTy_0);
-  StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   StructTy_llvm_dbg_global_variable_type_fields.push_back(PointerTy_0);
-  StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(1));
-  StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(1));
+  StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(mod->getContext(), 1));
+  StructTy_llvm_dbg_global_variable_type_fields.push_back(IntegerType::get(mod->getContext(), 1));
   StructTy_llvm_dbg_global_variable_type_fields.push_back(PointerTy_0);
   StructType* StructTy_llvm_dbg_global_variable_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_global_variable_type_fields, /*isPacked=*/false);
   mod->addTypeName("llvm.dbg.global_variable.type", StructTy_llvm_dbg_global_variable_type);
   
   std::vector<const Type*>StructTy_llvm_dbg_subprogram_type_fields;
-  StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   StructTy_llvm_dbg_subprogram_type_fields.push_back(PointerTy_0);
   StructTy_llvm_dbg_subprogram_type_fields.push_back(PointerTy_0);
   StructTy_llvm_dbg_subprogram_type_fields.push_back(PointerTy_2);
   StructTy_llvm_dbg_subprogram_type_fields.push_back(PointerTy_2);
   StructTy_llvm_dbg_subprogram_type_fields.push_back(PointerTy_2);
   StructTy_llvm_dbg_subprogram_type_fields.push_back(PointerTy_0);
-  StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   StructTy_llvm_dbg_subprogram_type_fields.push_back(PointerTy_0);
-  StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(1));
-  StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(1));
+  StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(mod->getContext(), 1));
+  StructTy_llvm_dbg_subprogram_type_fields.push_back(IntegerType::get(mod->getContext(), 1));
   StructType* StructTy_llvm_dbg_subprogram_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_subprogram_type_fields, /*isPacked=*/false);
   mod->addTypeName("llvm.dbg.subprogram.type", StructTy_llvm_dbg_subprogram_type);
   
   std::vector<const Type*>StructTy_llvm_dbg_variable_type_fields;
-  StructTy_llvm_dbg_variable_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_variable_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   StructTy_llvm_dbg_variable_type_fields.push_back(PointerTy_0);
   StructTy_llvm_dbg_variable_type_fields.push_back(PointerTy_2);
   StructTy_llvm_dbg_variable_type_fields.push_back(PointerTy_0);
-  StructTy_llvm_dbg_variable_type_fields.push_back(IntegerType::get(32));
+  StructTy_llvm_dbg_variable_type_fields.push_back(IntegerType::get(mod->getContext(), 32));
   StructTy_llvm_dbg_variable_type_fields.push_back(PointerTy_0);
   StructType* StructTy_llvm_dbg_variable_type = StructType::get(mod->getContext(), StructTy_llvm_dbg_variable_type_fields, /*isPacked=*/false);
   mod->addTypeName("llvm.dbg.variable.type", StructTy_llvm_dbg_variable_type);
@@ -130,16 +130,16 @@
   std::vector<const Type*>FuncTy_3_args;
   FuncTy_3_args.push_back(PointerTy_0);
   FunctionType* FuncTy_3 = FunctionType::get(
-    /*Result=*/Type::VoidTy,
+    /*Result=*/Type::getVoidTy(mod->getContext()),
     /*Params=*/FuncTy_3_args,
     /*isVarArg=*/false);
   
   std::vector<const Type*>FuncTy_4_args;
-  FuncTy_4_args.push_back(IntegerType::get(32));
-  FuncTy_4_args.push_back(IntegerType::get(32));
+  FuncTy_4_args.push_back(IntegerType::get(mod->getContext(), 32));
+  FuncTy_4_args.push_back(IntegerType::get(mod->getContext(), 32));
   FuncTy_4_args.push_back(PointerTy_0);
   FunctionType* FuncTy_4 = FunctionType::get(
-    /*Result=*/Type::VoidTy,
+    /*Result=*/Type::getVoidTy(mod->getContext()),
     /*Params=*/FuncTy_4_args,
     /*isVarArg=*/false);
   
@@ -147,7 +147,7 @@
   FuncTy_5_args.push_back(PointerTy_0);
   FuncTy_5_args.push_back(PointerTy_0);
   FunctionType* FuncTy_5 = FunctionType::get(
-    /*Result=*/Type::VoidTy,
+    /*Result=*/Type::getVoidTy(mod->getContext()),
     /*Params=*/FuncTy_5_args,
     /*isVarArg=*/false);