mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-24 18:52:15 +00:00
Cleanup function_decl::parameter::get_pretty_representation
Simplify the logic of function_decl::parameter::get_pretty_representation. * src/abg-ir.cc (function_decl::parameter::get_pretty_representation): Assert that the environment is always non-nil. Then no needs to check for it being non-nil anymore. Use is_type_decl instead of dynamic_pointer_cast. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
95b12167fa
commit
09a24a4767
@ -11468,15 +11468,13 @@ string
|
||||
function_decl::parameter::get_pretty_representation(bool internal) const
|
||||
{
|
||||
const environment* env = get_environment();
|
||||
assert(env);
|
||||
|
||||
string type_repr;
|
||||
type_base_sptr t = get_type();
|
||||
if (!t)
|
||||
type_repr = "void";
|
||||
else if (env
|
||||
&& (t ==
|
||||
dynamic_pointer_cast<type_base>
|
||||
(env->get_variadic_parameter_type_decl())))
|
||||
else if (is_type_decl((env->get_variadic_parameter_type_decl())))
|
||||
type_repr = "...";
|
||||
else
|
||||
type_repr = ir::get_pretty_representation(t, internal);
|
||||
|
Loading…
Reference in New Issue
Block a user