summaryrefslogtreecommitdiff
path: root/src/mir/helpers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir/helpers.cpp')
-rw-r--r--src/mir/helpers.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mir/helpers.cpp b/src/mir/helpers.cpp
index 2f787927..9242ccb7 100644
--- a/src/mir/helpers.cpp
+++ b/src/mir/helpers.cpp
@@ -34,6 +34,13 @@ void ::MIR::TypeResolve::print_msg(const char* tag, ::std::function<void(::std::
//throw CheckFailure {};
}
+unsigned int ::MIR::TypeResolve::get_cur_stmt_ofs() const
+{
+ if( this->stmt_idx == STMT_TERM )
+ return m_fcn.blocks.at(this->bb_idx).statements.size();
+ else
+ return this->stmt_idx;
+}
const ::MIR::BasicBlock& ::MIR::TypeResolve::get_block(::MIR::BasicBlockId id) const
{
MIR_ASSERT(*this, id < m_fcn.blocks.size(), "Block ID " << id << " out of range");