Path: blob/main/contrib/llvm-project/llvm/lib/DebugInfo/PDB/IPDBSourceFile.cpp
35266 views
//===- IPDBSourceFile.cpp - base interface for a PDB source file ----------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "llvm/DebugInfo/PDB/IPDBSourceFile.h"9#include "llvm/DebugInfo/PDB/PDBExtras.h"10#include "llvm/DebugInfo/PDB/PDBTypes.h"11#include "llvm/Support/Format.h"12#include "llvm/Support/raw_ostream.h"13#include <cstdint>14#include <string>1516using namespace llvm;17using namespace llvm::pdb;1819IPDBSourceFile::~IPDBSourceFile() = default;2021void IPDBSourceFile::dump(raw_ostream &OS, int Indent) const {22OS.indent(Indent);23PDB_Checksum ChecksumType = getChecksumType();24OS << "[";25if (ChecksumType != PDB_Checksum::None) {26OS << ChecksumType << ": ";27std::string Checksum = getChecksum();28for (uint8_t c : Checksum)29OS << format_hex_no_prefix(c, 2, true);30} else31OS << "No checksum";32OS << "] " << getFileName() << "\n";33}343536