14 #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_WINCODEVIEWLINETABLES_H
15 #define LLVM_LIB_CODEGEN_ASMPRINTER_WINCODEVIEWLINETABLES_H
41 FunctionInfo() : End(
nullptr) {}
55 unsigned ColumnNumber;
57 InstrInfoTy() : LineNumber(0), ColumnNumber(0) {}
59 InstrInfoTy(
StringRef Filename,
unsigned LineNumber,
unsigned ColumnNumber)
60 : Filename(Filename), LineNumber(LineNumber),
61 ColumnNumber(ColumnNumber) {}
68 struct FileNameRegistryTy {
79 FileNameRegistryTy() {
85 if (Infos.count(Filename))
87 size_t OldSize = Infos.size();
88 Infos[Filename].FilenameID = OldSize;
89 Infos[Filename].StartOffset = LastOffset;
90 LastOffset += Filename.
size() + 1;
91 Filenames.push_back(Filename);
101 typedef std::map<std::pair<StringRef, StringRef>,
char *>
102 DirAndFilenameToFilepathMapTy;
103 DirAndFilenameToFilepathMapTy DirAndFilenameToFilepathMap;
104 StringRef getFullFilepath(
const MDNode *S);
106 void maybeRecordLocation(DebugLoc
DL,
const MachineFunction *MF);
109 assert(CurFn ==
nullptr);
110 FileNameRegistry.clear();
114 void emitDebugInfoForFunction(
const Function *GV);
117 WinCodeViewLineTables(AsmPrinter *
Asm);
120 for (DirAndFilenameToFilepathMapTy::iterator
121 I = DirAndFilenameToFilepathMap.begin(),
122 E = DirAndFilenameToFilepathMap.end();
130 void endModule()
override;
size_t size() const
size - Get the string size.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Collects and handles AsmPrinter objects required to build debug or EH information.
static bool add(uint64_t *dest, const uint64_t *x, const uint64_t *y, unsigned len)
This function adds the integer array x to the integer array Y and places the result in dest...
~WinCodeViewLineTables() override
This class is intended to be used as a driving class for all asm writers.
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
void endInstruction() override
Process end of an instruction.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
Representation of each machine instruction.
void setSymbolSize(const llvm::MCSymbol *, uint64_t) override
For symbols that have a size designated (e.g.
Collects and handles line tables information in a CodeView format.
StringRef - Represent a constant reference to a string, i.e.