CBMC
cpp_enum_type.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: C++ Language Type Checking
4 
5 Author: Daniel Kroening, kroening@cs.cmu.edu
6 
7 \*******************************************************************/
8 
11 
12 #include "cpp_enum_type.h"
13 
15 {
16 }
17 
19 {
20  // This will only clash with anon enums that would have
21  // clashes on the enum constants anyway.
22 
23  const irept::subt &b=body().get_sub();
24 
25  std::string result="#anonE";
26 
27  for(const auto &value : b)
28  {
29  result+='#';
30  result += id2string(value.get(ID_name));
31  }
32 
33  return result;
34 }
const irept & body() const
Definition: cpp_enum_type.h:39
irep_idt generate_anon_tag() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:38
subt & get_sub()
Definition: irep.h:448
The type of an expression, extends irept.
Definition: type.h:29
C++ Language Type Checking.
const std::string & id2string(const irep_idt &d)
Definition: irep.h:44