diff gen/tocall.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 207a8a438dea
line wrap: on
line diff
--- a/gen/tocall.cpp	Thu Aug 06 16:02:14 2009 +0200
+++ b/gen/tocall.cpp	Fri Aug 14 00:39:18 2009 +0200
@@ -221,7 +221,7 @@
     }
     ++argidx;
 
-    args.push_back(gIR->ir->CreateBitCast(mem, getPtrToType(LLType::Int8Ty), "tmp"));
+    args.push_back(gIR->ir->CreateBitCast(mem, getPtrToType(LLType::getInt8Ty(gIR->context())), "tmp"));
     if (unsigned atts = tf->fty.arg_argptr->attrs) {
         Attr.Index = argidx;
         Attr.Attrs = atts;
@@ -529,7 +529,7 @@
 
     // void returns cannot not be named
     const char* varname = "";
-    if (callableTy->getReturnType() != LLType::VoidTy)
+    if (callableTy->getReturnType() != LLType::getVoidTy(gIR->context()))
         varname = "tmp";
 
 #if 0