Skip to content

Commit d64a46a

Browse files
author
Daniel Kroening
committed
symbolt::to_irep now returns an irep
1 parent 6be2c0b commit d64a46a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/util/symbol.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,10 @@ Function: symbolt::to_irep
8888
8989
\*******************************************************************/
9090

91-
void symbolt::to_irep(irept &dest) const
91+
irept symbolt::to_irep() const
9292
{
93+
irept dest;
94+
9395
dest.clear();
9496
dest.add(ID_type)=type;
9597
dest.add(ID_value)=value;
@@ -116,6 +118,8 @@ void symbolt::to_irep(irept &dest) const
116118
if(is_file_local) dest.set("is_file_local", true);
117119
if(is_extern) dest.set("is_extern", true);
118120
if(is_volatile) dest.set("is_volatile", true);
121+
122+
return dest;
119123
}
120124

121125
/*******************************************************************\

src/util/symbol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class symbolt
9494
void show(std::ostream &out) const;
9595

9696
// serialization
97-
void to_irep(irept &dest) const;
97+
irept to_irep() const;
9898
void from_irep(const irept &src);
9999

100100
class symbol_exprt symbol_expr() const;

0 commit comments

Comments
 (0)