void setPointerSize(PointerSize PS) { PtrSize = PS; }
// Access to any module-scope inline asm blocks.
- const std::string &getInlineAsm() const { return GlobalScopeAsm; }
- void setInlineAsm(const std::string &Asm) { GlobalScopeAsm = Asm; }
+ const std::string &getModuleInlineAsm() const { return GlobalScopeAsm; }
+ void setModuleInlineAsm(const std::string &Asm) { GlobalScopeAsm = Asm; }
//===--------------------------------------------------------------------===//
// Methods for easy access to the functions in the module.
GlobalVariable *getGlobalVariable(const std::string &Name, const Type *Ty,
bool AllowInternal = false);
+ /// getNamedGlobal - Return the first global variable in the module with the
+ /// specified name, of arbitrary type. This method returns null if a global
+ /// with the specified name is not found.
+ ///
+ GlobalVariable *getNamedGlobal(const std::string &Name);
+
//===--------------------------------------------------------------------===//
// Methods for easy access to the types in the module.
// table.
//
- /// Get the underlying elements of the Module...
- inline const GlobalListType &getGlobalList() const { return GlobalList; }
- inline GlobalListType &getGlobalList() { return GlobalList; }
- inline const FunctionListType &getFunctionList() const { return FunctionList;}
- inline FunctionListType &getFunctionList() { return FunctionList;}
+ // 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; }
/// getSymbolTable() - Get access to the symbol table for the module, where
/// global variables and functions are identified.
///
- inline SymbolTable &getSymbolTable() { return *SymTab; }
- inline const SymbolTable &getSymbolTable() const { return *SymTab; }
+ SymbolTable &getSymbolTable() { return *SymTab; }
+ const SymbolTable &getSymbolTable() const { return *SymTab; }
//===--------------------------------------------------------------------===//
bool global_empty() const { return GlobalList.empty(); }
// FunctionList interface
- inline iterator begin() { return FunctionList.begin(); }
- inline const_iterator begin() const { return FunctionList.begin(); }
- inline iterator end () { return FunctionList.end(); }
- inline const_iterator end () const { return FunctionList.end(); }
+ iterator begin() { return FunctionList.begin(); }
+ const_iterator begin() const { return FunctionList.begin(); }
+ iterator end () { return FunctionList.end(); }
+ const_iterator end () const { return FunctionList.end(); }
- inline size_t size() const { return FunctionList.size(); }
- inline bool empty() const { return FunctionList.empty(); }
+ size_t size() const { return FunctionList.size(); }
+ bool empty() const { return FunctionList.empty(); }
//===--------------------------------------------------------------------===//
// List of dependent library access functions