Defined in CompilerPredefine.h
| 9 | |
| 10 | // Defined in CompilerPredefine.h |
| 11 | LLAPI void* getCurrentModuleHandle() noexcept { |
| 12 | std::ifstream maps("/proc/self/maps"); |
| 13 | std::string line; |
| 14 | |
| 15 | if (std::getline(maps, line)) { |
| 16 | std::istringstream stream(line); |
| 17 | std::string address; |
| 18 | if (std::getline(stream, address, '-')) { |
| 19 | return (uintptr_t*)std::stoull(address, nullptr, 16); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | return nullptr; |
| 24 | } |
| 25 | |
| 26 | } // namespace ll::internal |
nothing calls this directly
no outgoing calls
no test coverage detected