Debian Codegraph @

cutl/compiler/type-info.cxx

raw
1 // file : cutl/compiler/type-info.cxx
2 // copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
3 // license : MIT; see accompanying LICENSE file
4
5 #include <cutl/compiler/type-info.hxx>
6
7 namespace cutl
8 {
9 namespace compiler
10 {
11 using namespace bits;
12
13 type_info const&
14 lookup (type_id const& tid)
15 {
16 type_info_map::const_iterator i (type_info_map_->find (tid));
17
18 if (i == type_info_map_->end ())
19 throw no_type_info ();
20
21 return i->second;
22 }
23
24 void
25 insert (type_info const& ti)
26 {
27 type_info_map_->insert (type_info_map::value_type (ti.type_id (), ti));
28 }
29 }
30 }