diff options
Diffstat (limited to 'include/llvm/Bitcode/BitcodeWriter.h')
| -rw-r--r-- | include/llvm/Bitcode/BitcodeWriter.h | 19 | 
1 files changed, 17 insertions, 2 deletions
diff --git a/include/llvm/Bitcode/BitcodeWriter.h b/include/llvm/Bitcode/BitcodeWriter.h index 4f72f98bbf9c..271cb2d81bbb 100644 --- a/include/llvm/Bitcode/BitcodeWriter.h +++ b/include/llvm/Bitcode/BitcodeWriter.h @@ -43,9 +43,16 @@ namespace llvm {      ///      /// \p GenerateHash enables hashing the Module and including the hash in the      /// bitcode (currently for use in ThinLTO incremental build). +    /// +    /// If \p ModHash is non-null, when GenerateHash is true, the resulting +    /// hash is written into ModHash. When GenerateHash is false, that value +    /// is used as the hash instead of computing from the generated bitcode. +    /// Can be used to produce the same module hash for a minimized bitcode +    /// used just for the thin link as in the regular full bitcode that will +    /// be used in the backend.      void writeModule(const Module *M, bool ShouldPreserveUseListOrder = false,                       const ModuleSummaryIndex *Index = nullptr, -                     bool GenerateHash = false); +                     bool GenerateHash = false, ModuleHash *ModHash = nullptr);    };    /// \brief Write the specified module to the specified raw output stream. @@ -62,10 +69,18 @@ namespace llvm {    ///    /// \p GenerateHash enables hashing the Module and including the hash in the    /// bitcode (currently for use in ThinLTO incremental build). +  /// +  /// If \p ModHash is non-null, when GenerateHash is true, the resulting +  /// hash is written into ModHash. When GenerateHash is false, that value +  /// is used as the hash instead of computing from the generated bitcode. +  /// Can be used to produce the same module hash for a minimized bitcode +  /// used just for the thin link as in the regular full bitcode that will +  /// be used in the backend.    void WriteBitcodeToFile(const Module *M, raw_ostream &Out,                            bool ShouldPreserveUseListOrder = false,                            const ModuleSummaryIndex *Index = nullptr, -                          bool GenerateHash = false); +                          bool GenerateHash = false, +                          ModuleHash *ModHash = nullptr);    /// Write the specified module summary index to the given raw output stream,    /// where it will be written in a new bitcode block. This is used when  | 
