mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-28 11:50:30 +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
|
bool
|
||||||
is_global_scope(const scope_decl&);
|
is_global_scope(const scope_decl&);
|
||||||
|
|
||||||
bool
|
const global_scope*
|
||||||
is_global_scope(const scope_decl*);
|
is_global_scope(const scope_decl*);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -3059,10 +3059,11 @@ is_global_scope(const scope_decl& scope)
|
|||||||
///
|
///
|
||||||
/// @param scope the scope to consider.
|
/// @param scope the scope to consider.
|
||||||
///
|
///
|
||||||
/// @return true iff the current scope is the global one.
|
/// @return the @ref global_scope* representing the scope @p scope or
|
||||||
bool
|
/// 0 if @p scope is not a global scope.
|
||||||
|
const global_scope*
|
||||||
is_global_scope(const scope_decl* 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.
|
/// Tests whether if a given scope is the global scope.
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user