summaryrefslogtreecommitdiff
path: root/src/trans/trans_list.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/trans/trans_list.cpp')
-rw-r--r--src/trans/trans_list.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/trans/trans_list.cpp b/src/trans/trans_list.cpp
index 4df20373..460a0e56 100644
--- a/src/trans/trans_list.cpp
+++ b/src/trans/trans_list.cpp
@@ -9,11 +9,19 @@
bool TransList::add_function(::HIR::Path p, const ::HIR::Function& f)
{
- TODO(Span(), "");
- return false;
+ auto rv = m_functions.insert( ::std::make_pair(mv$(p), &f) );
+ if( rv.second )
+ {
+ DEBUG("Function " << rv.first->first);
+ }
+ return rv.second;
}
bool TransList::add_static(::HIR::Path p, const ::HIR::Static& f)
{
- TODO(Span(), "");
- return false;
+ auto rv = m_statics.insert( ::std::make_pair(mv$(p), &f) );
+ if( rv.second )
+ {
+ DEBUG("Static " << rv.first->first);
+ }
+ return rv.second;
}