search for: funtyp

Displaying 4 results from an estimated 4 matches for "funtyp".

Did you mean: funty
2012 Apr 23
1
[LLVMdev] Problem about the type of Function's arguement in llvm
...struction*) () code is like follows: //#include necessary header files int main(){ InitializeNativeTarget(); LLVMContext Context; module = new Module("Program", Context); vector<Type *> argslist; argslist.push_back(Type::getDoubleTy(Context)); FunctionType *funType = FunctionType::get(Type::getDoubleTy(Context), argslist, false); Function *fun= cast<Function> ( module->getOrInsertFunction("fun", funType)); BasicBlock * block = BasicBlock::Create(Context, "mainBlock", fun); IRBuilder<> builder(block); Functi...
2006 Sep 16
0
[LLVMdev] failed assertion in PPCJITInfo.cpp when calling native function
...rogram looks as follows. Am I doing something wrong, or is this a bug in the JIT? Regards, Andreas // the "native" function that the llvm code should call extern "C" { void nativeFunction() {} } int main() { Module* module = new Module("module"); FunctionType* funType = FunctionType::get(Type::VoidTy, vector<const Type*>(), false); Function* nativeFunction = new Function( funType, GlobalValue::ExternalLinkage, "native", module); Function* llvmFunction = new Function(funType, GlobalValue::ExternalLinkage, "llvmFunction",...
2012 Apr 22
0
[LLVMdev] Problem about the type of Function's arguement in llvm
hi On Sun, Apr 22, 2012 at 8:36 PM, Jianfei Hu <hujianfei258 at gmail.com> wrote: > in the  tutorial of official llvm doc, chapter 3, it deals with arguement of > function as follow: > > for (Function::arg_iterator AI = F->arg_begin(); Idx != Args.size(); >        ++AI, ++Idx) { >     AI->setName(Args[Idx]); > >     // NamedValues is map<string, Value*>
2012 Apr 22
2
[LLVMdev] Problem about the type of Function's arguement in llvm
in the tutorial of official llvm doc, chapter 3, it deals with arguement of function as follow: for (Function::arg_iterator AI = F->arg_begin(); Idx != Args.size(); ++AI, ++Idx) { AI->setName(Args[Idx]); // NamedValues is map<string, Value*> NamedValues[Args[Idx]] = AI; and when it try to get the value of arguement, it simply does: Value