41 #define TYPE_RECORD(EnumName, EnumVal, Name) \ 42 Error visitKnownRecord(CVType &CVR, Name##Record &Record) override; 43 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) 44 #define MEMBER_RECORD(EnumName, EnumVal, Name) 45 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def" 57 CurrentTypeIndex =
Index;
65 Name =
"<field list>";
80 assert(Indices[
I] < CurrentTypeIndex);
82 Name.append(Types.getTypeName(Indices[
I]));
96 Name.append(Types.getTypeName(Indices[
I]));
100 Name.push_back(
'\"');
137 Name =
formatv(
"{0} {1}", Ret, Params).sstr<256>();
146 Name =
formatv(
"{0} {1}::{2}", Ret, Class, Params).sstr<256>();
181 Name.append(
" const");
183 Name.append(
" volatile");
185 Name.append(
" __unaligned");
187 Name.append(
" __restrict");
196 Name.append(
"const ");
198 Name.append(
"volatile ");
200 Name.append(
"__unaligned ");
250 TypeNameComputer Computer(Types);
254 return "<unknown UDT>";
256 return Computer.name();
260 switch (Sym.
kind()) {
262 case SymbolKind::S_GPROC32:
263 case SymbolKind::S_LPROC32:
264 case SymbolKind::S_GPROC32_ID:
265 case SymbolKind::S_LPROC32_ID:
266 case SymbolKind::S_LPROC32_DPC:
267 case SymbolKind::S_LPROC32_DPC_ID:
270 case SymbolKind::S_THUNK32:
273 case SymbolKind::S_SECTION:
276 case SymbolKind::S_COFFGROUP:
279 case SymbolKind::S_PUB32:
280 case SymbolKind::S_FILESTATIC:
281 case SymbolKind::S_REGREL32:
282 case SymbolKind::S_GDATA32:
283 case SymbolKind::S_LDATA32:
284 case SymbolKind::S_LMANDATA:
285 case SymbolKind::S_GMANDATA:
286 case SymbolKind::S_LTHREAD32:
287 case SymbolKind::S_GTHREAD32:
288 case SymbolKind::S_PROCREF:
289 case SymbolKind::S_LPROCREF:
292 case SymbolKind::S_REGISTER:
293 case SymbolKind::S_LOCAL:
296 case SymbolKind::S_BLOCK32:
299 case SymbolKind::S_LABEL32:
302 case SymbolKind::S_OBJNAME:
303 case SymbolKind::S_EXPORT:
304 case SymbolKind::S_UDT:
307 case SymbolKind::S_BPREL32:
310 case SymbolKind::S_UNAMESPACE:
318 if (Sym.
kind() == SymbolKind::S_CONSTANT) {
325 cantFail(Mapping.visitSymbolBegin(Sym));
326 cantFail(Mapping.visitKnownRecord(Sym, Const));
327 cantFail(Mapping.visitSymbolEnd(Sym));
336 return StringData.
split(
'\0').first;
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
static int getSymbolNameOffset(CVSymbol Sym)
This class represents lattice values for constants.
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
virtual CVType getType(TypeIndex Index)=0
uint32_t getEntryCount() const
TypeIndex getReferentType() const
MemberPointerInfo getMemberInfo() const
auto formatv(const char *Fmt, Ts &&... Vals) -> formatv_object< decltype(std::make_tuple(detail::build_format_adapter(std::forward< Ts >(Vals))...))>
std::string computeTypeName(TypeCollection &Types, TypeIndex Index)
StringRef getName() const
StringRef getName() const
StringRef getName() const
StringRef getName() const
ArrayRef< uint8_t > content() const
static Error visitKnownRecord(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
PointerMode getMode() const
TypeIndex getReturnType() const
StringRef getString() const
TypeIndex getContainingType() const
TypeIndex getArgumentList() const
TypeIndex getArgumentList() const
bool isPointerToMember() const
Error visitTypeRecord(CVType &Record, TypeIndex Index, TypeVisitorCallbacks &Callbacks, VisitorDataSource Source=VDS_BytesPresent)
StringRef toStringRef(bool B)
Construct a string ref from a boolean.
void consumeError(Error Err)
Consume a Error without doing anything.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static ErrorSuccess success()
Create a success value.
LLVM_NODISCARD std::pair< StringRef, StringRef > split(char Separator) const
Split into two substrings around the first occurrence of a separator character.
TypeIndex getReturnType() const
The access may modify the value stored in memory.
ArrayRef< TypeIndex > getIndices() const
ArrayRef< TypeIndex > getIndices() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Lightweight error class with error context and mandatory checking.
StringRef getName() const
TypeIndex getModifiedType() const
Provides read only access to a subclass of BinaryStream.
StringRef - Represent a constant reference to a string, i.e.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
StringRef getSymbolName(CVSymbol Sym)
TypeIndex getClassType() const
StringRef getName() const
ModifierOptions getModifiers() const