1 //===- IPDBSourceFile.cpp - base interface for a PDB source file *- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/DebugInfo/PDB/IPDBSourceFile.h"
12 #include "llvm/DebugInfo/PDB/PDBExtras.h"
13 #include "llvm/Support/Format.h"
14 #include "llvm/Support/raw_ostream.h"
18 IPDBSourceFile::~IPDBSourceFile() {}
20 void IPDBSourceFile::dump(raw_ostream &OS, int Indent,
21 PDB_DumpLevel Level) const {
22 if (Level == PDB_DumpLevel::Compact) {
24 PDB_Checksum ChecksumType = getChecksumType();
26 if (ChecksumType != PDB_Checksum::None) {
27 OS << ChecksumType << ": ";
28 std::string Checksum = getChecksum();
29 for (uint8_t c : Checksum)
30 OS << format_hex_no_prefix(c, 2, true);
33 OS << "] " << getFileName() << "\n";