-
- //===--------------------------------------------------------------------===//
- // Methods for direct access to the globals list, functions list, and symbol
- // table.
- //
-
- // Get the underlying elements of the Module.
- const GlobalListType &getGlobalList() const { return GlobalList; }
- GlobalListType &getGlobalList() { return GlobalList; }
- const FunctionListType &getFunctionList() const { return FunctionList; }
- FunctionListType &getFunctionList() { return FunctionList; }
- const InlineAsmListType &getInlineAsmList() const { return InlineAsmList; }
- InlineAsmListType &getInlineAsmList() { return InlineAsmList; }
-
- /// getSymbolTable() - Get access to the symbol table for the module, where
- /// global variables and functions are identified.
- ///
- SymbolTable &getSymbolTable() { return *SymTab; }
- const SymbolTable &getSymbolTable() const { return *SymTab; }
-
-
- //===--------------------------------------------------------------------===//
- // Module iterator forwarding functions
- //
- // Globals list interface
+/// @}
+/// @name Direct access to the globals list, functions list, and symbol table
+/// @{
+public:
+ /// Get the Module's list of global variables (constant).
+ const GlobalListType &getGlobalList() const { return GlobalList; }
+ /// Get the Module's list of global variables.
+ GlobalListType &getGlobalList() { return GlobalList; }
+ /// Get the Module's list of functions (constant).
+ const FunctionListType &getFunctionList() const { return FunctionList; }
+ /// Get the Module's list of functions.
+ FunctionListType &getFunctionList() { return FunctionList; }
+ /// Get the Module's list of aliases (constant).
+ const AliasListType &getAliasList() const { return AliasList; }
+ /// Get the Module's list of aliases.
+ AliasListType &getAliasList() { return AliasList; }
+ /// Get the symbol table of global variable and function identifiers
+ const ValueSymbolTable &getValueSymbolTable() const { return *ValSymTab; }
+ /// Get the Module's symbol table of global variable and function identifiers.
+ ValueSymbolTable &getValueSymbolTable() { return *ValSymTab; }
+ /// Get the symbol table of types
+ const TypeSymbolTable &getTypeSymbolTable() const { return *TypeSymTab; }
+ /// Get the Module's symbol table of types
+ TypeSymbolTable &getTypeSymbolTable() { return *TypeSymTab; }
+
+/// @}
+/// @name Global Variable Iteration
+/// @{
+public:
+ /// Get an iterator to the first global variable