IPDBSourceFile.cpp 981 B

1234567891011121314151617181920212223242526272829303132
  1. //===- IPDBSourceFile.cpp - base interface for a PDB source file *- C++ -*-===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #include "llvm/DebugInfo/PDB/IPDBSourceFile.h"
  10. #include "llvm/DebugInfo/PDB/PDBExtras.h"
  11. #include "llvm/Support/Format.h"
  12. #include "llvm/Support/raw_ostream.h"
  13. using namespace llvm;
  14. IPDBSourceFile::~IPDBSourceFile() {}
  15. void IPDBSourceFile::dump(raw_ostream &OS, int Indent) const {
  16. OS.indent(Indent);
  17. PDB_Checksum ChecksumType = getChecksumType();
  18. OS << "[";
  19. if (ChecksumType != PDB_Checksum::None) {
  20. OS << ChecksumType << ": ";
  21. std::string Checksum = getChecksum();
  22. for (uint8_t c : Checksum)
  23. OS << format_hex_no_prefix(c, 2, true);
  24. } else
  25. OS << "No checksum";
  26. OS << "] " << getFileName() << "\n";
  27. }