Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:57

0001 //===-- Checksum.h ----------------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_UTILITY_CHECKSUM_H
0010 #define LLDB_UTILITY_CHECKSUM_H
0011 
0012 #include "llvm/Support/MD5.h"
0013 
0014 namespace lldb_private {
0015 class Checksum {
0016 public:
0017   static llvm::MD5::MD5Result g_sentinel;
0018 
0019   Checksum(llvm::MD5::MD5Result md5 = g_sentinel);
0020   Checksum(const Checksum &checksum);
0021   Checksum &operator=(const Checksum &checksum);
0022 
0023   explicit operator bool() const;
0024   bool operator==(const Checksum &checksum) const;
0025   bool operator!=(const Checksum &checksum) const;
0026 
0027   std::string digest() const;
0028 
0029 private:
0030   void SetMD5(llvm::MD5::MD5Result);
0031 
0032   llvm::MD5::MD5Result m_checksum;
0033 };
0034 } // namespace lldb_private
0035 
0036 #endif // LLDB_UTILITY_CHECKSUM_H