diff ir/irtype.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 46f6365a50d7
children 8d086d552909
line wrap: on
line diff
--- a/ir/irtype.cpp	Thu Aug 06 17:04:36 2009 +0200
+++ b/ir/irtype.cpp	Thu Aug 06 01:47:39 2009 +0200
@@ -92,17 +92,17 @@
 
     case Tcomplex32:
         t2 = llvm::Type::FloatTy;
-        return llvm::StructType::get(t2, t2, NULL);
+        return llvm::StructType::get(gIR->context(), t2, t2, NULL);
 
     case Tcomplex64:
         t2 = llvm::Type::DoubleTy;
-        return llvm::StructType::get(t2, t2, NULL);
+        return llvm::StructType::get(gIR->context(), t2, t2, NULL);
 
     case Tcomplex80:
         t2 = (global.params.cpu == ARCHx86 || global.params.cpu == ARCHx86_64)
             ? llvm::Type::X86_FP80Ty
             : llvm::Type::DoubleTy;
-        return llvm::StructType::get(t2, t2, NULL);
+        return llvm::StructType::get(gIR->context(), t2, t2, NULL);
 
     case Tbool:
         return llvm::Type::Int1Ty;
@@ -204,7 +204,7 @@
     elemType = llvm::PointerType::get(elemType, 0);
 
     // create struct type
-    const llvm::Type* at = llvm::StructType::get(DtoSize_t(), elemType, NULL);
+    const llvm::Type* at = llvm::StructType::get(gIR->context(), DtoSize_t(), elemType, NULL);
 
     // name dynamic array types
     Type::sir->getState()->module->addTypeName(t->toChars(), at);