Skip to content

Commit

Permalink
Add symtabAPI/src/Type.C
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent 8057baa commit 76413e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 3 additions & 9 deletions docs/symtabAPI/developer/Type.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -432,13 +432,7 @@ Type.h
.. cpp:function:: bool operator==(const typeArray &otype) const
.. cpp:function:: void fixupUnknowns(Module *)

Usage
*****
.. cpp:var:: static boost::atomic<typeId_t> user_type_id

New user defined types can be added to a symtab object. The
following example shows both how to query type information after an
object file is successfully parsed and also add a new structure type.

.. rli:: https://raw.githubusercontent.com/dyninst/examples/master/symtabAPI/addType.cpp
:language: cpp
:linenos:
This is the ID that is decremented for each type a user defines. It is
global so that every type that the user defines has a unique ID.
2 changes: 0 additions & 2 deletions symtabAPI/src/Type.C
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ using namespace std;

static int findIntrensicType(std::string &name);

// This is the ID that is decremented for each type a user defines. It is
// Global so that every type that the user defines has a unique ID.
static boost::atomic<typeId_t> user_type_id(-10000);

static typeId_t getUniqueTypeId()
Expand Down

0 comments on commit 76413e4

Please sign in to comment.