DIASourceFile.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- DIASourceFile.h - DIA implementation of IPDBSourceFile ---*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_DEBUGINFO_PDB_DIA_DIASOURCEFILE_H
  14. #define LLVM_DEBUGINFO_PDB_DIA_DIASOURCEFILE_H
  15. #include "DIASupport.h"
  16. #include "llvm/DebugInfo/PDB/IPDBSourceFile.h"
  17. namespace llvm {
  18. namespace pdb {
  19. class DIASession;
  20. class DIASourceFile : public IPDBSourceFile {
  21. public:
  22. explicit DIASourceFile(const DIASession &Session,
  23. CComPtr<IDiaSourceFile> DiaSourceFile);
  24. std::string getFileName() const override;
  25. uint32_t getUniqueId() const override;
  26. std::string getChecksum() const override;
  27. PDB_Checksum getChecksumType() const override;
  28. std::unique_ptr<IPDBEnumChildren<PDBSymbolCompiland>>
  29. getCompilands() const override;
  30. CComPtr<IDiaSourceFile> getDiaFile() const { return SourceFile; }
  31. private:
  32. const DIASession &Session;
  33. CComPtr<IDiaSourceFile> SourceFile;
  34. };
  35. }
  36. }
  37. #endif
  38. #ifdef __GNUC__
  39. #pragma GCC diagnostic pop
  40. #endif