mirror of
git://sourceware.org/git/libabigail.git
synced 2025-03-08 23:57:38 +00:00
Various style nit fixes
* src/abg-ir.cc: Move the emacs mode specifier for the file to the top of the file, otherwise, it's not effective. (struct location_manager::priv): Add end of struct comment. (class_decl_hash::operator()): Add fn comment. * src/abg-ir.h: Move the emacs mode specifier for the file to the top of the file, otherwise, it's not effective. (class scope_decl): Add end of class comment. * src/abg-reader.cc: Move the emacs mode specifier for the file to the top of the file, otherwise, it's not effective. (read_context::{get_type_decl,add_type_decl): Add comment. (handle_namespace_decl): Fix indent. * src/abg-writer.cc: Move the emacs mode specifier for the file to the top of the file, otherwise, it's not effective.
This commit is contained in:
parent
ef642f44b6
commit
bfd352e5da
@ -1,3 +1,5 @@
|
||||
// -*- mode: C++ -*-
|
||||
//
|
||||
// Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU Application Binary Interface Generic
|
||||
@ -21,7 +23,6 @@
|
||||
// program; see the files COPYING3 and COPYING.RUNTIME respectively.
|
||||
// If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// -*- mode: C++ -*-
|
||||
/// @file
|
||||
|
||||
#include <vector>
|
||||
@ -93,7 +94,7 @@ struct location_manager::priv
|
||||
// location in the table gives us an integer that is used to build
|
||||
// instance of location types.
|
||||
std::vector<expanded_location> locs;
|
||||
};
|
||||
};// end struct location_manager::priv
|
||||
|
||||
location_manager::location_manager()
|
||||
{
|
||||
@ -966,6 +967,7 @@ class_decl::~class_decl()
|
||||
{
|
||||
}
|
||||
|
||||
/// A hashing function for instances of class_decl.
|
||||
size_t
|
||||
class_decl_hash::operator()(const class_decl& t) const
|
||||
{
|
||||
|
@ -1,3 +1,5 @@
|
||||
// -*- Mode: C++ -*-
|
||||
//
|
||||
// Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU Application Binary Interface Generic
|
||||
@ -21,7 +23,6 @@
|
||||
// program; see the files COPYING3 and COPYING.RUNTIME respectively.
|
||||
// If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// -*- mode: C++ -*-
|
||||
/// @file
|
||||
|
||||
#ifndef __ABG_IR_H__
|
||||
@ -170,6 +171,7 @@ private:
|
||||
/// \brief The base type of all declarations.
|
||||
class decl_base
|
||||
{
|
||||
// Forbidden
|
||||
decl_base();
|
||||
|
||||
void
|
||||
@ -254,7 +256,8 @@ private:
|
||||
std::string m_mangled_name;
|
||||
scope_decl* m_context;
|
||||
visibility m_visibility;
|
||||
};
|
||||
};// end class decl_base
|
||||
|
||||
|
||||
/// \brief A declaration that introduces a scope.
|
||||
class scope_decl : public decl_base
|
||||
@ -300,7 +303,7 @@ public:
|
||||
|
||||
private:
|
||||
std::list<shared_ptr<decl_base> > m_members;
|
||||
};
|
||||
};// end class scope_decl.
|
||||
|
||||
/// \brief Facility to hash instances of decl_base.
|
||||
struct decl_base_hash
|
||||
|
@ -1,3 +1,5 @@
|
||||
// -*- mode: C++ -*-
|
||||
|
||||
// Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU Application Binary Interface Generic
|
||||
@ -21,7 +23,6 @@
|
||||
// program; see the files COPYING3 and COPYING.RUNTIME respectively.
|
||||
// If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// -*- mode: C++ -*-
|
||||
/// @file
|
||||
|
||||
#include <cstring>
|
||||
@ -86,6 +87,14 @@ public:
|
||||
return m_reader;
|
||||
}
|
||||
|
||||
/// Return the type that is identified by a unique ID. Note that
|
||||
/// for a type to be "identified" by #id, the function key_type_decl
|
||||
/// must have been previously called with that type and with #id.
|
||||
///
|
||||
/// \param id the unique id to consider.
|
||||
///
|
||||
/// \return the type identified by the unique id #id, or a null
|
||||
/// pointer if no type has ever been associated with id before.
|
||||
shared_ptr<type_base>
|
||||
get_type_decl(const string& id) const
|
||||
{
|
||||
@ -155,6 +164,15 @@ public:
|
||||
return t;
|
||||
}
|
||||
|
||||
/// Associate an ID with a type.
|
||||
///
|
||||
/// \param type the type to associate witht he ID.
|
||||
///
|
||||
/// \param the ID to associate to the type.
|
||||
///
|
||||
/// \return true upon successful completion, false otherwise. Note
|
||||
/// that this returns false if the was already associate to an ID
|
||||
/// before.
|
||||
bool
|
||||
add_type_decl(const string& id,
|
||||
shared_ptr<type_base> type)
|
||||
@ -1575,7 +1593,7 @@ handle_namespace_decl(read_context& ctxt)
|
||||
|
||||
string name;
|
||||
if (xml_char_sptr s = XML_READER_GET_ATTRIBUTE(r, "name"))
|
||||
name = CHAR_STR(s);
|
||||
name = CHAR_STR(s);
|
||||
|
||||
location loc;
|
||||
read_location(ctxt, loc);
|
||||
|
@ -1,3 +1,4 @@
|
||||
// -*- mode: C++ -*-
|
||||
// Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU Application Binary Interface Generic
|
||||
@ -21,7 +22,6 @@
|
||||
// program; see the files COPYING3 and COPYING.RUNTIME respectively.
|
||||
// If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// -*- mode: C++ -*-
|
||||
/// @file
|
||||
|
||||
#include <ostream>
|
||||
|
Loading…
Reference in New Issue
Block a user