diff gen/aa.cpp @ 163:a8cd9bc1021a trunk

[svn r179] lots and lots of fixes, much more of tango now compiles/works.
author lindquist
date Mon, 05 May 2008 07:36:29 +0200
parents ccd07d9f2ce9
children 08cfde5f70d3
line wrap: on
line diff
--- a/gen/aa.cpp	Mon May 05 00:56:53 2008 +0200
+++ b/gen/aa.cpp	Mon May 05 07:36:29 2008 +0200
@@ -81,19 +81,19 @@
     llvm::Value* keyti = to_keyti(key);
     keyti = DtoBitCast(keyti, funcTy->getParamType(1));
 
+    // valuesize param
+    llvm::Value* valsize = DtoConstSize_t(getABITypeSize(DtoType(type)));
+
     // pkey param
     llvm::Value* pkey = to_pkey(key);
-    pkey = DtoBitCast(pkey, funcTy->getParamType(2));
-
-    // valuesize param
-    llvm::Value* valsize = DtoConstSize_t(getABITypeSize(DtoType(type)));
+    pkey = DtoBitCast(pkey, funcTy->getParamType(3));
 
     // build arg vector
     std::vector<llvm::Value*> args;
     args.push_back(aaval);
     args.push_back(keyti);
+    args.push_back(valsize);
     args.push_back(pkey);
-    args.push_back(valsize);
 
     // call runtime
     llvm::Value* ret = gIR->ir->CreateCall(func, args.begin(), args.end(), "aa.index");