LLVM: lib/DebugInfo/PDB/Native/NativeSourceFile.cpp Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

14

15using namespace llvm;

17

20 : Session(Session), FileId(FileId), Checksum(Checksum) {}

21

23 auto ST = Session.getPDBFile().getStringTable();

24 if (!ST) {

26 return "";

27 }

28 auto FileName = ST->getStringTable().getString(Checksum.FileNameOffset);

29 if (!FileName) {

31 return "";

32 }

33

34 return std::string(FileName.get());

35}

36

38

42

46

47std::unique_ptr<IPDBEnumChildren>

std::string str() const

str - Get the contents as an std::string.

std::string getChecksum() const override

Definition NativeSourceFile.cpp:39

NativeSourceFile(NativeSession &Session, uint32_t FileId, const codeview::FileChecksumEntry &Checksum)

Definition NativeSourceFile.cpp:18

PDB_Checksum getChecksumType() const override

Definition NativeSourceFile.cpp:43

std::string getFileName() const override

Definition NativeSourceFile.cpp:22

std::unique_ptr< IPDBEnumChildren< PDBSymbolCompiland > > getCompilands() const override

Definition NativeSourceFile.cpp:48

uint32_t getUniqueId() const override

Definition NativeSourceFile.cpp:37

PDB_Checksum

Specifies the hash algorithm that a source file from a PDB was hashed with.

This is an optimization pass for GlobalISel generic memory operations.

void consumeError(Error Err)

Consume a Error without doing anything.

StringRef toStringRef(bool B)

Construct a string ref from a boolean.