3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-12 04:31:29 +00:00

Deprecate Const::bitvectorize()

This commit is contained in:
Robert O'Callahan 2025-08-28 06:00:50 +00:00
parent e41bf86cc3
commit 31fc0f53e5
2 changed files with 18 additions and 15 deletions

View file

@ -739,6 +739,7 @@ private:
bitvectype& get_bits() const;
std::string& get_str() const;
std::vector<RTLIL::State>& bits_internal();
void bitvectorize_internal() const;
public:
Const() : flags(RTLIL::CONST_FLAG_NONE), tag(backing_tag::bits), bits_(std::vector<RTLIL::State>()) {}
@ -767,8 +768,11 @@ public:
bool operator ==(const RTLIL::Const &other) const;
bool operator !=(const RTLIL::Const &other) const;
[[deprecated]]
[[deprecated("Don't use direct access to the internal std::vector<State>, that's an implementation detail.")]]
std::vector<RTLIL::State>& bits() { return bits_internal(); }
[[deprecated("Don't call bitvectorize() directly, it's an implementation detail.")]]
void bitvectorize() const { bitvectorize_internal(); }
bool as_bool() const;
// Convert the constant value to a C++ int.
@ -797,7 +801,6 @@ public:
std::string decode_string() const;
int size() const;
bool empty() const;
void bitvectorize() const;
void append(const RTLIL::Const &other);
void set(int i, RTLIL::State state) {