aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-10-04 13:31:33 -0700
committerEddie Hung <eddie@fpgeh.com>2019-10-04 15:00:57 -0700
commit279fd22ddfe44a9ddd6504134d1029f6b7649149 (patch)
treee9fd8e7dc37d410b9ccacf25fa702b8911385b9b /kernel
parent9fef1df3c1431cff2e097a10a502f77f04986a60 (diff)
downloadyosys-279fd22ddfe44a9ddd6504134d1029f6b7649149.tar.gz
yosys-279fd22ddfe44a9ddd6504134d1029f6b7649149.tar.bz2
yosys-279fd22ddfe44a9ddd6504134d1029f6b7649149.zip
Add Const::{begin,end,empty}()
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rtlil.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index c08653b65..e5b24cc02 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -609,8 +609,11 @@ struct RTLIL::Const
std::string decode_string() const;
inline int size() const { return bits.size(); }
+ inline bool empty() const { return bits.empty(); }
inline RTLIL::State &operator[](int index) { return bits.at(index); }
inline const RTLIL::State &operator[](int index) const { return bits.at(index); }
+ inline decltype(bits)::iterator begin() { return bits.begin(); }
+ inline decltype(bits)::iterator end() { return bits.end(); }
bool is_fully_zero() const;
bool is_fully_ones() const;