mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-09 21:24:14 +00:00
oilgen: avoid demangling empty symbols
This commit is contained in:
parent
a509354624
commit
929a2e68f8
@ -21,6 +21,7 @@
|
||||
#include <boost/core/demangle.hpp>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
#include <variant>
|
||||
|
||||
@ -44,6 +45,8 @@ OIGenerator::oilStrongToWeakSymbolsMap(drgnplusplus::program& prog) {
|
||||
auto symbols = prog.find_all_symbols();
|
||||
for (drgn_symbol* sym : *symbols) {
|
||||
auto symName = drgnplusplus::symbol::name(sym);
|
||||
if (symName == nullptr || *symName == '\0')
|
||||
continue;
|
||||
auto demangled = boost::core::demangle(symName);
|
||||
|
||||
if (demangled.starts_with(strongSymbolPrefix)) {
|
||||
|
Loading…
Reference in New Issue
Block a user