Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
putting a comment back in
  • Loading branch information
fosterbrereton committed May 9, 2025
commit 67aaaae3b92c815b9075f3bd1f2e6f59b88affbe
9 changes: 7 additions & 2 deletions include/orc/dwarf_structs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,19 @@ std::ostream& operator<<(std::ostream& s, const attribute& x);

//--------------------------------------------------------------------------------------------------
// I'm not a fan of the name `attribute_sequence`.
//
// TODO: Consider using `std::array` instead of `std::vector` to avoid dynamic allocation. This
// would require we cap the max number of attributes at compile time, which should be okay as long
// as we pick a reasonable number. On the other hand, that would make DIEs with smaller sets of
// attributes less memory efficient. It's the classic space/time tradeoff.
struct attribute_sequence {
using attributes_type = std::vector<attribute>;
using value_type = typename attributes_type::value_type;
using iterator = typename attributes_type::iterator;
using const_iterator = typename attributes_type::const_iterator;

void reserve(std::size_t n) {
_attributes.reserve(n);
void reserve(std::size_t size) {
_attributes.reserve(size);
}

bool has(dw::at name) const {
Expand Down
Loading