search for: diagclient

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

2010 Aug 18
1
[LLVMdev] clang: call extern function using JIT
...Args.push_back(Mod->getModuleIdentifier()); return EE->runFunctionAsMain(EntryFn, Args, envp); } int main(int argc, const char **argv, char * const *envp) { void *MainAddr = (void*) (intptr_t) GetExecutablePath; llvm::sys::Path Path = GetExecutablePath(argv[0]); TextDiagnosticPrinter DiagClient(llvm::errs(), DiagnosticOptions()); Diagnostic Diags(&DiagClient); Driver TheDriver(Path.str(), llvm::sys::getHostTriple(), "a.out", /*IsProduction=*/false, /*CXXIsProduction=*/false, Diags); TheDriver.setTitle("clang interpreter"...
2010 Aug 18
0
[LLVMdev] clang: call extern function using JIT
I tried what you said, now I get: LLVM ERROR: Program used external function 'yipee' which could not be resolved! Stack dump: 0. Running pass 'X86 Machine Code Emitter' on function '@main' did not even get as far as a breakpoint. Óscar Fuentes wrote: > > gafferuk <gafferuk at gmail.com> writes: > >> Im confused. The function i wish to call is
2010 Aug 18
2
[LLVMdev] clang: call extern function using JIT
gafferuk <gafferuk at gmail.com> writes: > Im confused. The function i wish to call is a return type of int. > Im calling it with int dd = yipee(1); > > What's wrong? Declare the function: int yipee(int); int main() { int dd = yipee(1); return 0; } If that still crashes, put a breakpoint on `yipee' and see if the execution gets there, if the argument is
2013 Oct 03
0
[LLVMdev] libclang JIT frontend
...*argv, char * const *envp) { void *MainAddr = (void*) (intptr_t) GetExecutablePath; // llvm::sys::Path Path = GetExecutablePath(argv[0]); llvm::sys::Path Path = GetExecutablePath(argv); IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions(); TextDiagnosticPrinter *DiagClient = new TextDiagnosticPrinter(llvm::errs(), &*DiagOpts); IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs()); DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagClient); Driver TheDriver(Path.str(), llvm::sys::getProcessTriple(), "a.out", Diags); TheDriver....