42 #define TYPE_RECORD(EnumName, EnumVal, Name) \ 43 Error visitKnownRecord(CVType &CVR, Name##Record &Record) override; 44 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) 45 #define MEMBER_RECORD(EnumName, EnumVal, Name) 46 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def" 58 CurrentTypeIndex =
Index;
66 Name =
"<field list>";
81 assert(Indices[
I] < CurrentTypeIndex);
83 Name.append(Types.getTypeName(Indices[
I]));
97 Name.append(Types.getTypeName(Indices[
I]));
101 Name.push_back(
'\"');
138 Name =
formatv(
"{0} {1}", Ret, Params).sstr<256>();
147 Name =
formatv(
"{0} {1}::{2}", Ret, Class, Params).sstr<256>();
182 Name.append(
" const");
184 Name.append(
" volatile");
186 Name.append(
" __unaligned");
188 Name.append(
" __restrict");
194 uint16_t Mods =
static_cast<uint16_t
>(Mod.
getModifiers());
197 Name.append(
"const ");
199 Name.append(
"volatile ");
201 Name.append(
"__unaligned ");
251 TypeNameComputer Computer(Types);
255 return "<unknown UDT>";
257 return Computer.name();
261 switch (Sym.
kind()) {
263 case SymbolKind::S_GPROC32:
264 case SymbolKind::S_LPROC32:
265 case SymbolKind::S_GPROC32_ID:
266 case SymbolKind::S_LPROC32_ID:
267 case SymbolKind::S_LPROC32_DPC:
268 case SymbolKind::S_LPROC32_DPC_ID:
271 case SymbolKind::S_THUNK32:
274 case SymbolKind::S_SECTION:
277 case SymbolKind::S_COFFGROUP:
280 case SymbolKind::S_PUB32:
281 case SymbolKind::S_FILESTATIC:
282 case SymbolKind::S_REGREL32:
283 case SymbolKind::S_GDATA32:
284 case SymbolKind::S_LDATA32:
285 case SymbolKind::S_LMANDATA:
286 case SymbolKind::S_GMANDATA:
287 case SymbolKind::S_LTHREAD32:
288 case SymbolKind::S_GTHREAD32:
289 case SymbolKind::S_PROCREF:
290 case SymbolKind::S_LPROCREF:
293 case SymbolKind::S_REGISTER:
294 case SymbolKind::S_LOCAL:
297 case SymbolKind::S_BLOCK32:
300 case SymbolKind::S_LABEL32:
303 case SymbolKind::S_OBJNAME:
304 case SymbolKind::S_EXPORT:
305 case SymbolKind::S_UDT:
308 case SymbolKind::S_BPREL32:
311 case SymbolKind::S_UNAMESPACE:
319 if (Sym.
kind() == SymbolKind::S_CONSTANT) {
326 cantFail(Mapping.visitSymbolBegin(Sym));
327 cantFail(Mapping.visitKnownRecord(Sym, Const));
328 cantFail(Mapping.visitSymbolEnd(Sym));
337 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.
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
amdgpu Simplify well known AMD library false Value Value const Twine & Name
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