fix: correct use of string types.
This commit is contained in:
@@ -39,11 +39,11 @@ void BoundSymbolList::write(const fs::path& path) const {
|
||||
}
|
||||
|
||||
void BoundSymbolList::record(
|
||||
std::string_view symbol,
|
||||
const std::string& symbol,
|
||||
rva_t rva,
|
||||
bool is_function
|
||||
) {
|
||||
m_entities.emplace(BoundSymbol{std::string(symbol), rva, is_function});
|
||||
m_entities.emplace(BoundSymbol{symbol, rva, is_function});
|
||||
}
|
||||
|
||||
} // namespace di::data_format
|
||||
|
||||
@@ -12,7 +12,7 @@ public:
|
||||
void read(const fs::path& path) override;
|
||||
void write(const fs::path& path) const override;
|
||||
|
||||
void record(std::string_view symbol, rva_t rva, bool is_function);
|
||||
void record(const std::string& symbol, rva_t rva, bool is_function);
|
||||
|
||||
constexpr void for_each(const for_each_callback_t& callback) const {
|
||||
for (const auto& entity : m_entities) callback(entity);
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
// Do not mangle template deduction guides.
|
||||
if (isa<CXXDeductionGuideDecl>(decl)) return true;
|
||||
|
||||
std::string mangled_name = m_namegen.getName(decl);
|
||||
auto mangled_name = m_namegen.getName(decl);
|
||||
if (!mangled_name.empty()) {
|
||||
if (config_record_decl_name) {
|
||||
mangled_name = std::format(
|
||||
|
||||
Reference in New Issue
Block a user