search for: mypasslibrary

Displaying 3 results from an estimated 3 matches for "mypasslibrary".

2011 Jun 15
3
[LLVMdev] Cannot use function pass in a module pass
...up-to-date llvm from svn). Despite what the tutorial (http://llvm.org/docs/WritingAnLLVMPass.html) states in my module pass I cannot perform getAnalysis and fetch the function pass result. When trying to do so `opt` fails with the following mesage: [***@*** ***]$ opt -load ~/llvm/Debug+Asserts/lib/MyPassLibrary.so -mymodulepass < input.bc >/dev/null MyModulePass::runOnModule MyFunctionPass::runOnFunction(process) opt: /***/llvm/include/llvm/MyFunctionPass.h:241: AnalysisType& llvm::Pass::getAnalysisID(llvm::AnalysisID, llvm::Function&) [with AnalysisType = {anonymous}::MyFunctionPass, llvm::...
2011 Jun 16
0
[LLVMdev] Cannot use function pass in a module pass
...er versions of LLVM, you cannot call getAnalysis<FunctionPassName>(F) if F is a function with no body. You need to do something like: if (!(F->isDeclaration())) { getAnalysis<FunctionPassName>(F); ... } -- John T. > [***@*** ***]$ opt -load ~/llvm/Debug+Asserts/lib/MyPassLibrary.so > -mymodulepass< input.bc>/dev/null > MyModulePass::runOnModule > MyFunctionPass::runOnFunction(process) > opt: /***/llvm/include/llvm/MyFunctionPass.h:241: AnalysisType& > llvm::Pass::getAnalysisID(llvm::AnalysisID, llvm::Function&) [with > AnalysisType = {anony...
2011 Jun 16
1
[LLVMdev] Cannot use function pass in a module pass
...nalysis<FunctionPassName>(F) if F is a function with no body. > You need to do something like: > > if (!(F->isDeclaration())) { >     getAnalysis<FunctionPassName>(F); >     ... > } > > -- John T. > >> [***@*** ***]$ opt -load ~/llvm/Debug+Asserts/lib/MyPassLibrary.so >> -mymodulepass<  input.bc>/dev/null >> MyModulePass::runOnModule >> MyFunctionPass::runOnFunction(process) >> opt: /***/llvm/include/llvm/MyFunctionPass.h:241: AnalysisType& >> llvm::Pass::getAnalysisID(llvm::AnalysisID, llvm::Function&) [with >&g...