14 #ifndef LLVM_MC_MCCODEVIEW_H 15 #define LLVM_MC_MCCODEVIEW_H 26 class MCObjectStreamer;
28 class CodeViewContext;
38 uint16_t PrologueEnd : 1;
44 unsigned line,
unsigned column,
bool prologueend,
bool isstmt)
45 : Label(Label), FunctionId(functionid), FileNum(fileNum), Line(line),
46 Column(column), PrologueEnd(prologueend), IsStmt(isstmt) {}
66 bool isStmt()
const {
return IsStmt; }
76 void setLine(
unsigned line) { Line = line; }
80 assert(column <= UINT16_MAX);
98 unsigned ParentFuncIdPlusOne = 0;
100 enum :
unsigned { FunctionSentinel = ~0U };
127 return !isUnallocatedFunctionInfo() &&
128 ParentFuncIdPlusOne != FunctionSentinel;
132 assert(isInlinedCallSite());
133 return ParentFuncIdPlusOne - 1;
143 bool isValidFileNumber(
unsigned FileNumber)
const;
149 bool recordFunctionId(
unsigned FuncId);
155 bool recordInlinedCallSiteId(
unsigned FuncId,
unsigned IAFunc,
156 unsigned IAFile,
unsigned IALine,
167 unsigned FileNo,
unsigned Line,
unsigned Column,
168 bool PrologueEnd,
bool IsStmt);
170 bool isValidCVFileNumber(
unsigned FileNumber);
173 void addLineEntry(
const MCCVLoc &LineEntry);
175 std::vector<MCCVLoc> getFunctionLineEntries(
unsigned FuncId);
177 std::pair<size_t, size_t> getLineExtent(
unsigned FuncId);
187 unsigned PrimaryFunctionId,
188 unsigned SourceFileId,
189 unsigned SourceLineNum,
199 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
223 bool InsertedStrTabFragment =
false;
228 unsigned getStringTableOffset(
StringRef S);
231 unsigned StringTableOffset;
235 bool Assigned =
false;
251 std::map<unsigned, std::pair<size_t, size_t>> MCCVLineStartStop;
254 std::vector<MCCVLoc> MCCVLines;
257 std::vector<MCCVFunctionInfo> Functions;
261 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...
static void addToStringTable(raw_ostream &Out, StringRef ArcName, const NewArchiveMember &M, bool Thin)
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.