diff ir/irtypestruct.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 72f00d740665
line wrap: on
line diff
--- a/ir/irtypestruct.cpp	Thu Aug 06 16:02:14 2009 +0200
+++ b/ir/irtypestruct.cpp	Fri Aug 14 00:39:18 2009 +0200
@@ -16,7 +16,7 @@
 //////////////////////////////////////////////////////////////////////////////
 
 IrTypeAggr::IrTypeAggr(AggregateDeclaration * ad)
-:   IrType(ad->type, llvm::OpaqueType::get()),
+:   IrType(ad->type, llvm::OpaqueType::get(gIR->context())),
     aggr(ad)
 {
 }
@@ -41,22 +41,22 @@
     {
         if (global.params.is64bit && diff % 8 == 0)
         {
-            defaultTypes.push_back(llvm::Type::Int64Ty);
+            defaultTypes.push_back(llvm::Type::getInt64Ty(gIR->context()));
             diff -= 8;
         }
         else if (diff % 4 == 0)
         {
-            defaultTypes.push_back(llvm::Type::Int32Ty);
+            defaultTypes.push_back(llvm::Type::getInt32Ty(gIR->context()));
             diff -= 4;
         }
         else if (diff % 2 == 0)
         {
-            defaultTypes.push_back(llvm::Type::Int16Ty);
+            defaultTypes.push_back(llvm::Type::getInt16Ty(gIR->context()));
             diff -= 2;
         }
         else
         {
-            defaultTypes.push_back(llvm::Type::Int8Ty);
+            defaultTypes.push_back(llvm::Type::getInt8Ty(gIR->context()));
             diff -= 1;
         }
     }