diff gen/tocall.cpp @ 1013:8c73ff5f69e0

Use llvm::CallSite instead of custom CallOrInvoke class.
author Frits van Bommel <fvbommel wxs.nl>
date Sat, 28 Feb 2009 22:16:52 +0100
parents 7a0238db1962
children e8c6dbcd33d1
line wrap: on
line diff
--- a/gen/tocall.cpp	Sat Feb 28 19:58:30 2009 +0100
+++ b/gen/tocall.cpp	Sat Feb 28 22:16:52 2009 +0100
@@ -459,10 +459,10 @@
         Logger::cout() << "Calling: " << *callable << '\n';
 
     // call the function
-    CallOrInvoke* call = gIR->CreateCallOrInvoke(callable, args.begin(), args.end(), varname);
+    LLCallSite call = gIR->CreateCallOrInvoke(callable, args.begin(), args.end(), varname);
 
     // get return value
-    LLValue* retllval = (retinptr) ? args[0] : call->get();
+    LLValue* retllval = (retinptr) ? args[0] : call.getInstruction();
 
     if (tf->linkage == LINKintrinsic)
     {
@@ -521,11 +521,11 @@
         if (llfunc && llfunc->isIntrinsic()) // override intrinsic attrs
             attrlist = llvm::Intrinsic::getAttributes((llvm::Intrinsic::ID)llfunc->getIntrinsicID());
         else
-            call->setCallingConv(callconv);
+            call.setCallingConv(callconv);
     }
     else
-        call->setCallingConv(callconv);
-    call->setAttributes(attrlist);
+        call.setCallingConv(callconv);
+    call.setAttributes(attrlist);
 
     return new DImValue(resulttype, retllval);
 }