LLVM  14.0.0git
IPDBSourceFile.cpp
Go to the documentation of this file.
1 //===- IPDBSourceFile.cpp - base interface for a PDB source file ----------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
12 #include "llvm/Support/Format.h"
14 #include <cstdint>
15 #include <string>
16 
17 using namespace llvm;
18 using namespace llvm::pdb;
19 
21 
22 void IPDBSourceFile::dump(raw_ostream &OS, int Indent) const {
23  OS.indent(Indent);
24  PDB_Checksum ChecksumType = getChecksumType();
25  OS << "[";
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);
31  } else
32  OS << "No checksum";
33  OS << "] " << getFileName() << "\n";
34 }
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::pdb::IPDBSourceFile::getFileName
virtual std::string getFileName() const =0
Format.h
llvm::format_hex_no_prefix
FormattedNumber format_hex_no_prefix(uint64_t N, unsigned Width, bool Upper=false)
format_hex_no_prefix - Output N as a fixed width hexadecimal.
Definition: Format.h:199
llvm::pdb::IPDBSourceFile::dump
void dump(raw_ostream &OS, int Indent) const
Definition: IPDBSourceFile.cpp:22
llvm::pdb::IPDBSourceFile::getChecksumType
virtual PDB_Checksum getChecksumType() const =0
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
c
the resulting code requires compare and branches when and if the revised code is with conditional branches instead of More there is a byte word extend before each where there should be only and the condition codes are not remembered when the same two values are compared twice More LSR enhancements i8 and i32 load store addressing modes are identical int int c
Definition: README.txt:418
PDBTypes.h
llvm::pdb
Definition: ConcreteSymbolEnumerator.h:20
llvm::pdb::PDB_Checksum::None
@ None
IPDBSourceFile.h
llvm::pdb::PDB_Checksum
PDB_Checksum
Specifies the hash algorithm that a source file from a PDB was hashed with.
Definition: PDBTypes.h:119
llvm::raw_ostream::indent
raw_ostream & indent(unsigned NumSpaces)
indent - Insert 'NumSpaces' spaces.
Definition: raw_ostream.cpp:497
PDBExtras.h
llvm::pdb::IPDBSourceFile::getChecksum
virtual std::string getChecksum() const =0
llvm::pdb::IPDBSourceFile::~IPDBSourceFile
virtual ~IPDBSourceFile()
raw_ostream.h