X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FModule.h;h=501625df7a3dcb3e127f6c16f7ff5c391de29346;hb=528700863adefca8de461ce28a7d903729fb96b4;hp=0f8722dc9d37ef210219824bd1518b26181b5b40;hpb=28bc9d88260a3e153ead4311c9129e3d3ad07736;p=oota-llvm.git diff --git a/include/llvm/Module.h b/include/llvm/Module.h index 0f8722dc9d3..501625df7a3 100644 --- a/include/llvm/Module.h +++ b/include/llvm/Module.h @@ -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;