diff --git a/src/goto-programs/builtin_functions.cpp b/src/goto-programs/builtin_functions.cpp index b3d6d82f650..0cef3e382b4 100644 --- a/src/goto-programs/builtin_functions.cpp +++ b/src/goto-programs/builtin_functions.cpp @@ -580,7 +580,7 @@ void goto_convertt::do_cpp_new( if(new_array) new_call.arguments().push_back(count); new_call.arguments().push_back(object_size); - new_call.set("#type", lhs.type().subtype()); + new_call.set(ID_C_cxx_alloc_type, lhs.type().subtype()); new_call.lhs()=tmp_symbol_expr; new_call.add_source_location()=rhs.source_location(); @@ -612,7 +612,7 @@ void goto_convertt::do_cpp_new( new_call.arguments().push_back(count); new_call.arguments().push_back(object_size); new_call.arguments().push_back(rhs.op0()); // memory location - new_call.set("#type", lhs.type().subtype()); + new_call.set(ID_C_cxx_alloc_type, lhs.type().subtype()); new_call.lhs()=tmp_symbol_expr; new_call.add_source_location()=rhs.source_location(); diff --git a/src/pointer-analysis/value_set.cpp b/src/pointer-analysis/value_set.cpp index 1a6c639ff92..b35952dc064 100644 --- a/src/pointer-analysis/value_set.cpp +++ b/src/pointer-analysis/value_set.cpp @@ -796,7 +796,7 @@ void value_sett::get_value_set_rec( assert(suffix==""); const typet &dynamic_type= - static_cast(expr.find("#type")); + static_cast(expr.find(ID_C_cxx_alloc_type)); dynamic_object_exprt dynamic_object(dynamic_type); dynamic_object.set_instance(location_number); diff --git a/src/pointer-analysis/value_set_fivr.cpp b/src/pointer-analysis/value_set_fivr.cpp index e06d73b245b..45e721137e0 100644 --- a/src/pointer-analysis/value_set_fivr.cpp +++ b/src/pointer-analysis/value_set_fivr.cpp @@ -853,7 +853,7 @@ void value_set_fivrt::get_value_set_rec( assert(suffix==""); const typet &dynamic_type= - static_cast(expr.find("#type")); + static_cast(expr.find(ID_C_cxx_alloc_type)); dynamic_object_exprt dynamic_object(dynamic_type); // let's make up a `unique' number for this object... diff --git a/src/pointer-analysis/value_set_fivrns.cpp b/src/pointer-analysis/value_set_fivrns.cpp index 4591bdd938d..c94afc8f95d 100644 --- a/src/pointer-analysis/value_set_fivrns.cpp +++ b/src/pointer-analysis/value_set_fivrns.cpp @@ -627,7 +627,7 @@ void value_set_fivrnst::get_value_set_rec( assert(suffix==""); const typet &dynamic_type= - static_cast(expr.find("#type")); + static_cast(expr.find(ID_C_cxx_alloc_type)); dynamic_object_exprt dynamic_object(dynamic_type); // let's make up a `unique' number for this object... diff --git a/src/util/irep_ids.def b/src/util/irep_ids.def index 91379187bde..56153453d7c 100644 --- a/src/util/irep_ids.def +++ b/src/util/irep_ids.def @@ -205,6 +205,7 @@ IREP_ID_ONE(main) IREP_ID_ONE(expression) IREP_ID_ONE(free) IREP_ID_ONE(malloc) +IREP_ID_TWO(C_cxx_alloc_type, #cxx_alloc_type) IREP_ID_ONE(cpp_new) IREP_ID_ONE(cpp_delete) IREP_ID_TWO(cpp_new_array, cpp_new[])