13 #ifndef LLVM_MC_MCCODEVIEW_H 14 #define LLVM_MC_MCCODEVIEW_H 25 class MCObjectStreamer;
27 class CodeViewContext;
37 uint16_t PrologueEnd : 1;
43 unsigned line,
unsigned column,
bool prologueend,
bool isstmt)
44 : Label(Label), FunctionId(functionid), FileNum(fileNum), Line(line),
45 Column(column), PrologueEnd(prologueend), IsStmt(isstmt) {}
65 bool isStmt()
const {
return IsStmt; }
75 void setLine(
unsigned line) { Line = line; }
79 assert(column <= UINT16_MAX);
97 unsigned ParentFuncIdPlusOne = 0;
99 enum :
unsigned { FunctionSentinel = ~0U };
126 return !isUnallocatedFunctionInfo() &&
127 ParentFuncIdPlusOne != FunctionSentinel;
131 assert(isInlinedCallSite());
132 return ParentFuncIdPlusOne - 1;
142 bool isValidFileNumber(
unsigned FileNumber)
const;
148 bool recordFunctionId(
unsigned FuncId);
154 bool recordInlinedCallSiteId(
unsigned FuncId,
unsigned IAFunc,
155 unsigned IAFile,
unsigned IALine,
166 unsigned FileNo,
unsigned Line,
unsigned Column,
167 bool PrologueEnd,
bool IsStmt);
169 bool isValidCVFileNumber(
unsigned FileNumber);
172 void addLineEntry(
const MCCVLoc &LineEntry);
174 std::vector<MCCVLoc> getFunctionLineEntries(
unsigned FuncId);
176 std::pair<size_t, size_t> getLineExtent(
unsigned FuncId);
186 unsigned PrimaryFunctionId,
187 unsigned SourceFileId,
188 unsigned SourceLineNum,
198 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
214 std::pair<StringRef, unsigned> addToStringTable(
StringRef S);
222 bool InsertedStrTabFragment =
false;
227 unsigned getStringTableOffset(
StringRef S);
230 unsigned StringTableOffset;
234 bool Assigned =
false;
250 std::map<unsigned, std::pair<size_t, size_t>> MCCVLineStartStop;
253 std::vector<MCCVLoc> MCCVLines;
256 std::vector<MCCVFunctionInfo> Functions;
260 bool ChecksumOffsetsAssigned =
false;
Instances of this class represent a uniqued identifier for a section in the current translation unit...
Instances of this class represent the information from a .cv_loc directive.
This class represents lattice values for constants.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
bool isPrologueEnd() const
DenseMap< unsigned, LineInfo > InlinedAtMap
Map from inlined call site id to the inlined at location to use for that call site.
void setColumn(unsigned column)
Set the Column of this MCCVLoc.
Encapsulates the layout of an assembly file at a particular point in time.
unsigned getLine() const
Get the Line of this MCCVLoc.
Context object for machine code objects.
Streaming object file generation interface.
bool isInlinedCallSite() const
Returns true if this represents an inlined call site, meaning ParentFuncIdPlusOne is neither zero nor...
unsigned getParentFuncId() const
friend class CodeViewContext
Streaming machine code generation interface.
void setLabel(const MCSymbol *L)
void setFunctionId(unsigned FID)
void setFileNum(unsigned fileNum)
Set the FileNum of this MCCVLoc.
Fragment representing the .cv_def_range directive.
void setLine(unsigned line)
Set the Line of this MCCVLoc.
unsigned getFileNum() const
Get the FileNum of this MCCVLoc.
Fragment representing the binary annotations produced by the .cv_inline_linetable directive...
bool isUnallocatedFunctionInfo() const
Returns true if this is function info has not yet been used in a .cv_func_id or .cv_inline_site_id di...
void setPrologueEnd(bool PE)
const MCSymbol * getLabel() const
Fragment for data and encoded instructions.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
unsigned getColumn() const
Get the Column of this MCCVLoc.
StringRef - Represent a constant reference to a string, i.e.
Information describing a function or inlined call site introduced by .cv_func_id or ...
unsigned getFunctionId() const
Holds state from .cv_file and .cv_loc directives for later emission.