Move some methods out of MachineInstr into MachineOperand
[oota-llvm.git] / include / llvm / Module.h
index d8f6a455cc62ecc35ee94bc9e293d7c7f201b45f..84aa2a5e39426fb7a70dd9cef0584f4d333674f3 100644 (file)
@@ -98,8 +98,8 @@ public:
   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.
@@ -148,6 +148,12 @@ public:
   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.
@@ -174,17 +180,17 @@ public:
   // 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; }
 
 
   //===--------------------------------------------------------------------===//
@@ -198,13 +204,13 @@ public:
   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