};// end class decl_base
bool
-operator==(const decl_base_sptr, const decl_base_sptr);
+operator==(const decl_base_sptr&, const decl_base_sptr&);
bool
-operator==(const type_base_sptr, const type_base_sptr);
+operator==(const type_base_sptr&, const type_base_sptr&);
std::ostream&
operator<<(std::ostream&, decl_base::visibility);
set_binding(binding b);
void
- set_symbol(elf_symbol_sptr sym);
+ set_symbol(const elf_symbol_sptr& sym);
- elf_symbol_sptr
+ const elf_symbol_sptr&
get_symbol() const;
var_decl_sptr
set_type(function_type_sptr fn_type);
void
- set_symbol(elf_symbol_sptr sym);
+ set_symbol(const elf_symbol_sptr& sym);
- elf_symbol_sptr
+ const elf_symbol_sptr&
get_symbol() const;
bool
/// @return true if the decl_base pointed to by the shared_ptrs are
/// equal, false otherwise.
bool
-operator==(const decl_base_sptr l, const decl_base_sptr r)
+operator==(const decl_base_sptr& l, const decl_base_sptr& r)
{
if (l.get() == r.get())
return true;
/// @return true if the type_base pointed to by the shared_ptrs are
/// equal, false otherwise.
bool
-operator==(const type_base_sptr l, const type_base_sptr r)
+operator==(const type_base_sptr& l, const type_base_sptr& r)
{
if (l.get() == r.get())
return true;
///
/// @param sym the new ELF symbol for this variable decl.
void
-var_decl::set_symbol(elf_symbol_sptr sym)
+var_decl::set_symbol(const elf_symbol_sptr& sym)
{priv_->symbol_ = sym;}
/// Gets the the underlying ELF symbol for the current variable,
///
/// @return sym the underlying ELF symbol for this variable decl, if
/// one exists.
-elf_symbol_sptr
+const elf_symbol_sptr&
var_decl::get_symbol() const
{return priv_->symbol_;}
///
/// @param sym the new ELF symbol for this function decl.
void
-function_decl::set_symbol(elf_symbol_sptr sym)
+function_decl::set_symbol(const elf_symbol_sptr& sym)
{priv_->symbol_ = sym;}
/// Gets the the underlying ELF symbol for the current variable,
///
/// @return sym the underlying ELF symbol for this function decl, if
/// one exists.
-elf_symbol_sptr
+const elf_symbol_sptr&
function_decl::get_symbol() const
{return priv_->symbol_;}