add and document regex support for FileCheck. You can now do stuff like:
[oota-llvm.git] / include / llvm / Module.h
index 0f8722dc9d37ef210219824bd1518b26181b5b40..501625df7a3dcb3e127f6c16f7ff5c391de29346 100644 (file)
@@ -132,7 +132,7 @@ public:
 /// @name Member Variables
 /// @{
 private:
-  LLVMContext& Context;    ///< The LLVMContext from which types and
+  LLVMContext& Context;          ///< The LLVMContext from which types and
                                  ///< constants are allocated.
   GlobalListType GlobalList;     ///< The Global Variables in the module
   FunctionListType FunctionList; ///< The Functions in the module
@@ -303,11 +303,16 @@ public:
 /// @name Named Metadata Accessors
 /// @{
 public:
-  /// getNamedMetadata - Return the first named MDNode in the module with the
-  /// specified name. This method returns null if a MDNode with the specified
-  /// name is not found.
+  /// getNamedMetadata - Return the first NamedMDNode in the module with the
+  /// specified name. This method returns null if a NamedMDNode with the 
+  /// specified name is not found.
   NamedMDNode *getNamedMetadata(const StringRef &Name) const;
 
+  /// getOrInsertNamedMetadata - Return the first named MDNode in the module 
+  /// with the specified name. This method returns a new NamedMDNode if a 
+  /// NamedMDNode with the specified name is not found.
+  NamedMDNode *getOrInsertNamedMetadata(const StringRef &Name);
+
 /// @}
 /// @name Type Accessors
 /// @{
@@ -463,7 +468,6 @@ public:
 public:
   /// Print the module to an output stream with AssemblyAnnotationWriter.
   void print(raw_ostream &OS, AssemblyAnnotationWriter *AAW) const;
-  void print(std::ostream &OS, AssemblyAnnotationWriter *AAW) const;
   
   /// Dump the module to stderr (for debugging).
   void dump() const;
@@ -477,11 +481,7 @@ public:
 /// @}
 };
 
-/// An iostream inserter for modules.
-inline std::ostream &operator<<(std::ostream &O, const Module &M) {
-  M.print(O, 0);
-  return O;
-}
+/// An raw_ostream inserter for modules.
 inline raw_ostream &operator<<(raw_ostream &O, const Module &M) {
   M.print(O, 0);
   return O;