diff options
author | Anutosh Bhat <andersonbhat491@gmail.com> | 2025-04-01 18:03:45 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-01 15:33:45 +0300 |
commit | 8f56394487a4d454be0637667267ad37bd636d0f (patch) | |
tree | 55ba045fb8ccc8b4d2deb46a07372064780ba8ed /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | c192737009584377d99b18bfbc8298c8e58bcd02 (diff) | |
download | llvm-8f56394487a4d454be0637667267ad37bd636d0f.zip llvm-8f56394487a4d454be0637667267ad37bd636d0f.tar.gz llvm-8f56394487a4d454be0637667267ad37bd636d0f.tar.bz2 |
[clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (#133037)
**Currently we don't make use of the JIT for the wasm use cases so the
approach using the execution engine won't work in these cases.**
Rather if we use dlopen. We should be able to do the following
(demonstrating through a toy project)
1) Make use of LoadDynamicLibrary through the given implementation
```
extern "C" EMSCRIPTEN_KEEPALIVE int load_library(const char *name) {
auto Err = Interp->LoadDynamicLibrary(name);
if (Err) {
llvm::logAllUnhandledErrors(std::move(Err), llvm::errs(), "load_library error: ");
return -1;
}
return 0;
}
```
2) Add a button to call load_library once the library has been added in
our MEMFS (currently we have symengine built as a SIDE MODULE and we are
loading it)
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions