Hi! I have this scenario: executionEngine->getPointerToFunction fails because a symbol can not be resolved. What can I do to catch this error? is an exception thrown? currently the program simply exits. returning NULL would be ok too. -Jochen
Can you be more precise about where the error occurs? Depending on where it is, LLVM may or may not be able to propagate the error safely. Reid On Tue, Oct 26, 2010 at 4:05 PM, Jochen Wilhelmy <j.wilhelmy at arcor.de> wrote:> Hi! > > I have this scenario: > executionEngine->getPointerToFunction fails because a symbol can not be > resolved. > > What can I do to catch this error? is an exception thrown? currently the > program simply > exits. returning NULL would be ok too. > > -Jochen > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
> Can you be more precise about where the error occurs? Depending on > where it is, LLVM may or may not be able to propagate the error > safely. >I cannot say where inside llvm the error occurs, but imagine you have a module added to an execution engine and then call executionEngine->getPointerToFunction while the code in your module calls a function that has no implementation. it is obvious that llvm has to report an error, but currently the program exits and the documentation of getPointerToFunction does not say what happens if such an error occurs. If this still does not help or the reported behaviour is atypical, I can step into it and check what llvm does. -Jochen