comparison gen/tollvm.cpp @ 141:8f43f5c43c95 trunk

[svn r145] fixed some x86 problems
author lindquist
date Wed, 23 Jan 2008 12:58:51 +0100
parents ce7b81fb957f
children a123dca8349b
comparison
equal deleted inserted replaced
140:ffcc9a2f3d9d 141:8f43f5c43c95
224 pvec.push_back(int8ptrty); 224 pvec.push_back(int8ptrty);
225 pvec.push_back(set?int8ty:int8ptrty); 225 pvec.push_back(set?int8ty:int8ptrty);
226 pvec.push_back(bits==32?int32ty:int64ty); 226 pvec.push_back(bits==32?int32ty:int64ty);
227 pvec.push_back(int32ty); 227 pvec.push_back(int32ty);
228 llvm::FunctionType* functype = llvm::FunctionType::get(voidty, pvec, false); 228 llvm::FunctionType* functype = llvm::FunctionType::get(voidty, pvec, false);
229 return new llvm::Function(functype, llvm::GlobalValue::ExternalLinkage, name, gIR->module); 229 return llvm::cast<llvm::Function>(gIR->module->getOrInsertFunction(name, functype));
230 } 230 }
231 231
232 ////////////////////////////////////////////////////////////////////////////////////////// 232 //////////////////////////////////////////////////////////////////////////////////////////
233 233
234 // llvm.memset.i32 234 // llvm.memset.i32