mirror of
git://sourceware.org/git/libabigail.git
synced 2025-01-31 05:41:38 +00:00
Make is_global_scope() return a pointer to the global scope
This helps while debugging from GDB. * include/abg-fwd.h (is_global_scope): Return a global_scope*. * src/abg-ir.cc (is_global_scope): Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
75915d5bde
commit
f9ec2f1555
@ -143,7 +143,7 @@ get_translation_unit(const shared_ptr<decl_base>);
|
||||
bool
|
||||
is_global_scope(const scope_decl&);
|
||||
|
||||
bool
|
||||
const global_scope*
|
||||
is_global_scope(const scope_decl*);
|
||||
|
||||
bool
|
||||
|
@ -3059,10 +3059,11 @@ is_global_scope(const scope_decl& scope)
|
||||
///
|
||||
/// @param scope the scope to consider.
|
||||
///
|
||||
/// @return true iff the current scope is the global one.
|
||||
bool
|
||||
/// @return the @ref global_scope* representing the scope @p scope or
|
||||
/// 0 if @p scope is not a global scope.
|
||||
const global_scope*
|
||||
is_global_scope(const scope_decl* scope)
|
||||
{return scope ? is_global_scope(*scope) : false;}
|
||||
{return dynamic_cast<const global_scope*>(scope);}
|
||||
|
||||
/// Tests whether if a given scope is the global scope.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user