LLVM  14.0.0git
SymbolRecordMapping.cpp
Go to the documentation of this file.
1 //===- SymbolRecordMapping.cpp -----------------------------------*- C++-*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
11 using namespace llvm;
12 using namespace llvm::codeview;
13 
14 #define error(X) \
15  if (auto EC = X) \
16  return EC;
17 
18 namespace {
19 struct MapGap {
20  Error operator()(CodeViewRecordIO &IO, LocalVariableAddrGap &Gap) const {
22  error(IO.mapInteger(Gap.Range));
23  return Error::success();
24  }
25 };
26 }
27 
29  LocalVariableAddrRange &Range) {
30  error(IO.mapInteger(Range.OffsetStart));
31  error(IO.mapInteger(Range.ISectStart));
32  error(IO.mapInteger(Range.Range));
33  return Error::success();
34 }
35 
38  return Error::success();
39 }
40 
42  error(IO.padToAlignment(alignOf(Container)));
43  error(IO.endRecord());
44  return Error::success();
45 }
46 
48 
49  error(IO.mapInteger(Block.Parent));
50  error(IO.mapInteger(Block.End));
51  error(IO.mapInteger(Block.CodeSize));
52  error(IO.mapInteger(Block.CodeOffset));
53  error(IO.mapInteger(Block.Segment));
54  error(IO.mapStringZ(Block.Name));
55 
56  return Error::success();
57 }
58 
60 
61  error(IO.mapInteger(Thunk.Parent));
62  error(IO.mapInteger(Thunk.End));
63  error(IO.mapInteger(Thunk.Next));
64  error(IO.mapInteger(Thunk.Offset));
65  error(IO.mapInteger(Thunk.Segment));
66  error(IO.mapInteger(Thunk.Length));
67  error(IO.mapEnum(Thunk.Thunk));
68  error(IO.mapStringZ(Thunk.Name));
69  error(IO.mapByteVectorTail(Thunk.VariantData));
70 
71  return Error::success();
72 }
73 
75  TrampolineSym &Tramp) {
76 
77  error(IO.mapEnum(Tramp.Type));
78  error(IO.mapInteger(Tramp.Size));
79  error(IO.mapInteger(Tramp.ThunkOffset));
80  error(IO.mapInteger(Tramp.TargetOffset));
81  error(IO.mapInteger(Tramp.ThunkSection));
82  error(IO.mapInteger(Tramp.TargetSection));
83 
84  return Error::success();
85 }
86 
89  uint8_t Padding = 0;
90 
91  error(IO.mapInteger(Section.SectionNumber));
92  error(IO.mapInteger(Section.Alignment));
93  error(IO.mapInteger(Padding));
94  error(IO.mapInteger(Section.Rva));
95  error(IO.mapInteger(Section.Length));
96  error(IO.mapInteger(Section.Characteristics));
97  error(IO.mapStringZ(Section.Name));
98 
99  return Error::success();
100 }
101 
103  CoffGroupSym &CoffGroup) {
104 
105  error(IO.mapInteger(CoffGroup.Size));
106  error(IO.mapInteger(CoffGroup.Characteristics));
107  error(IO.mapInteger(CoffGroup.Offset));
108  error(IO.mapInteger(CoffGroup.Segment));
109  error(IO.mapStringZ(CoffGroup.Name));
110 
111  return Error::success();
112 }
113 
115  BPRelativeSym &BPRel) {
116 
117  error(IO.mapInteger(BPRel.Offset));
118  error(IO.mapInteger(BPRel.Type));
119  error(IO.mapStringZ(BPRel.Name));
120 
121  return Error::success();
122 }
123 
125  BuildInfoSym &BuildInfo) {
126 
127  error(IO.mapInteger(BuildInfo.BuildId));
128 
129  return Error::success();
130 }
131 
133  CallSiteInfoSym &CallSiteInfo) {
134  uint16_t Padding = 0;
135 
136  error(IO.mapInteger(CallSiteInfo.CodeOffset));
137  error(IO.mapInteger(CallSiteInfo.Segment));
138  error(IO.mapInteger(Padding));
139  error(IO.mapInteger(CallSiteInfo.Type));
140 
141  return Error::success();
142 }
143 
145  EnvBlockSym &EnvBlock) {
146 
147  uint8_t Reserved = 0;
148  error(IO.mapInteger(Reserved));
149  error(IO.mapStringZVectorZ(EnvBlock.Fields));
150 
151  return Error::success();
152 }
153 
155  FileStaticSym &FileStatic) {
156 
157  error(IO.mapInteger(FileStatic.Index));
158  error(IO.mapInteger(FileStatic.ModFilenameOffset));
159  error(IO.mapEnum(FileStatic.Flags));
160  error(IO.mapStringZ(FileStatic.Name));
161 
162  return Error::success();
163 }
164 
166 
167  error(IO.mapInteger(Export.Ordinal));
168  error(IO.mapEnum(Export.Flags));
169  error(IO.mapStringZ(Export.Name));
170 
171  return Error::success();
172 }
173 
175  Compile2Sym &Compile2) {
176 
177  error(IO.mapEnum(Compile2.Flags));
178  error(IO.mapEnum(Compile2.Machine));
179  error(IO.mapInteger(Compile2.VersionFrontendMajor));
180  error(IO.mapInteger(Compile2.VersionFrontendMinor));
181  error(IO.mapInteger(Compile2.VersionFrontendBuild));
182  error(IO.mapInteger(Compile2.VersionBackendMajor));
183  error(IO.mapInteger(Compile2.VersionBackendMinor));
184  error(IO.mapInteger(Compile2.VersionBackendBuild));
185  error(IO.mapStringZ(Compile2.Version));
186  error(IO.mapStringZVectorZ(Compile2.ExtraStrings));
187 
188  return Error::success();
189 }
190 
192  Compile3Sym &Compile3) {
193 
194  error(IO.mapEnum(Compile3.Flags));
195  error(IO.mapEnum(Compile3.Machine));
196  error(IO.mapInteger(Compile3.VersionFrontendMajor));
197  error(IO.mapInteger(Compile3.VersionFrontendMinor));
198  error(IO.mapInteger(Compile3.VersionFrontendBuild));
199  error(IO.mapInteger(Compile3.VersionFrontendQFE));
200  error(IO.mapInteger(Compile3.VersionBackendMajor));
201  error(IO.mapInteger(Compile3.VersionBackendMinor));
202  error(IO.mapInteger(Compile3.VersionBackendBuild));
203  error(IO.mapInteger(Compile3.VersionBackendQFE));
204  error(IO.mapStringZ(Compile3.Version));
205 
206  return Error::success();
207 }
208 
211 
212  error(IO.mapInteger(Constant.Type));
214  error(IO.mapStringZ(Constant.Name));
215 
216  return Error::success();
217 }
218 
220 
221  error(IO.mapInteger(Data.Type));
222  error(IO.mapInteger(Data.DataOffset));
223  error(IO.mapInteger(Data.Segment));
224  error(IO.mapStringZ(Data.Name));
225 
226  return Error::success();
227 }
228 
230  CVSymbol &CVR, DefRangeFramePointerRelSym &DefRangeFramePointerRel) {
231 
232  error(IO.mapObject(DefRangeFramePointerRel.Hdr.Offset));
233  error(mapLocalVariableAddrRange(IO, DefRangeFramePointerRel.Range));
234  error(IO.mapVectorTail(DefRangeFramePointerRel.Gaps, MapGap()));
235 
236  return Error::success();
237 }
238 
240  CVSymbol &CVR,
241  DefRangeFramePointerRelFullScopeSym &DefRangeFramePointerRelFullScope) {
242 
243  error(IO.mapInteger(DefRangeFramePointerRelFullScope.Offset));
244 
245  return Error::success();
246 }
247 
249  CVSymbol &CVR, DefRangeRegisterRelSym &DefRangeRegisterRel) {
250 
251  error(IO.mapObject(DefRangeRegisterRel.Hdr.Register));
252  error(IO.mapObject(DefRangeRegisterRel.Hdr.Flags));
253  error(IO.mapObject(DefRangeRegisterRel.Hdr.BasePointerOffset));
254  error(mapLocalVariableAddrRange(IO, DefRangeRegisterRel.Range));
255  error(IO.mapVectorTail(DefRangeRegisterRel.Gaps, MapGap()));
256 
257  return Error::success();
258 }
259 
261  CVSymbol &CVR, DefRangeRegisterSym &DefRangeRegister) {
262 
263  error(IO.mapObject(DefRangeRegister.Hdr.Register));
264  error(IO.mapObject(DefRangeRegister.Hdr.MayHaveNoName));
265  error(mapLocalVariableAddrRange(IO, DefRangeRegister.Range));
266  error(IO.mapVectorTail(DefRangeRegister.Gaps, MapGap()));
267 
268  return Error::success();
269 }
270 
272  CVSymbol &CVR, DefRangeSubfieldRegisterSym &DefRangeSubfieldRegister) {
273 
274  error(IO.mapObject(DefRangeSubfieldRegister.Hdr.Register));
275  error(IO.mapObject(DefRangeSubfieldRegister.Hdr.MayHaveNoName));
276  error(IO.mapObject(DefRangeSubfieldRegister.Hdr.OffsetInParent));
277  error(mapLocalVariableAddrRange(IO, DefRangeSubfieldRegister.Range));
278  error(IO.mapVectorTail(DefRangeSubfieldRegister.Gaps, MapGap()));
279 
280  return Error::success();
281 }
282 
284  CVSymbol &CVR, DefRangeSubfieldSym &DefRangeSubfield) {
285 
286  error(IO.mapInteger(DefRangeSubfield.Program));
287  error(IO.mapInteger(DefRangeSubfield.OffsetInParent));
288  error(mapLocalVariableAddrRange(IO, DefRangeSubfield.Range));
289  error(IO.mapVectorTail(DefRangeSubfield.Gaps, MapGap()));
290 
291  return Error::success();
292 }
293 
295  DefRangeSym &DefRange) {
296 
297  error(IO.mapInteger(DefRange.Program));
298  error(mapLocalVariableAddrRange(IO, DefRange.Range));
299  error(IO.mapVectorTail(DefRange.Gaps, MapGap()));
300 
301  return Error::success();
302 }
303 
305  FrameCookieSym &FrameCookie) {
306 
307  error(IO.mapInteger(FrameCookie.CodeOffset));
308  error(IO.mapInteger(FrameCookie.Register));
309  error(IO.mapEnum(FrameCookie.CookieKind));
310  error(IO.mapInteger(FrameCookie.Flags));
311 
312  return Error::success();
313 }
314 
316  FrameProcSym &FrameProc) {
317  error(IO.mapInteger(FrameProc.TotalFrameBytes));
318  error(IO.mapInteger(FrameProc.PaddingFrameBytes));
319  error(IO.mapInteger(FrameProc.OffsetToPadding));
323  error(IO.mapEnum(FrameProc.Flags));
324 
325  return Error::success();
326 }
327 
329  CVSymbol &CVR, HeapAllocationSiteSym &HeapAllocSite) {
330 
331  error(IO.mapInteger(HeapAllocSite.CodeOffset));
332  error(IO.mapInteger(HeapAllocSite.Segment));
333  error(IO.mapInteger(HeapAllocSite.CallInstructionSize));
334  error(IO.mapInteger(HeapAllocSite.Type));
335 
336  return Error::success();
337 }
338 
341 
342  error(IO.mapInteger(InlineSite.Parent));
343  error(IO.mapInteger(InlineSite.End));
344  error(IO.mapInteger(InlineSite.Inlinee));
345  error(IO.mapByteVectorTail(InlineSite.AnnotationData));
346 
347  return Error::success();
348 }
349 
352 
353  error(IO.mapInteger(Register.Index));
355  error(IO.mapStringZ(Register.Name));
356 
357  return Error::success();
358 }
359 
361  PublicSym32 &Public) {
362 
363  error(IO.mapEnum(Public.Flags));
364  error(IO.mapInteger(Public.Offset));
365  error(IO.mapInteger(Public.Segment));
366  error(IO.mapStringZ(Public.Name));
367 
368  return Error::success();
369 }
370 
372  ProcRefSym &ProcRef) {
373 
374  error(IO.mapInteger(ProcRef.SumName));
375  error(IO.mapInteger(ProcRef.SymOffset));
376  error(IO.mapInteger(ProcRef.Module));
377  error(IO.mapStringZ(ProcRef.Name));
378 
379  return Error::success();
380 }
381 
383 
384  error(IO.mapInteger(Label.CodeOffset));
385  error(IO.mapInteger(Label.Segment));
386  error(IO.mapEnum(Label.Flags));
387  error(IO.mapStringZ(Label.Name));
388 
389  return Error::success();
390 }
391 
393  error(IO.mapInteger(Local.Type));
394  error(IO.mapEnum(Local.Flags));
395  error(IO.mapStringZ(Local.Name));
396 
397  return Error::success();
398 }
399 
401  ObjNameSym &ObjName) {
402 
403  error(IO.mapInteger(ObjName.Signature));
404  error(IO.mapStringZ(ObjName.Name));
405 
406  return Error::success();
407 }
408 
410  error(IO.mapInteger(Proc.Parent));
411  error(IO.mapInteger(Proc.End));
412  error(IO.mapInteger(Proc.Next));
413  error(IO.mapInteger(Proc.CodeSize));
414  error(IO.mapInteger(Proc.DbgStart));
415  error(IO.mapInteger(Proc.DbgEnd));
416  error(IO.mapInteger(Proc.FunctionType));
417  error(IO.mapInteger(Proc.CodeOffset));
418  error(IO.mapInteger(Proc.Segment));
419  error(IO.mapEnum(Proc.Flags));
420  error(IO.mapStringZ(Proc.Name));
421  return Error::success();
422 }
423 
425  ScopeEndSym &ScopeEnd) {
426  return Error::success();
427 }
428 
431  Caller.Indices,
432  [](CodeViewRecordIO &IO, TypeIndex &N) { return IO.mapInteger(N); }));
433  return Error::success();
434 }
435 
437  RegRelativeSym &RegRel) {
438 
439  error(IO.mapInteger(RegRel.Offset));
440  error(IO.mapInteger(RegRel.Type));
441  error(IO.mapEnum(RegRel.Register));
442  error(IO.mapStringZ(RegRel.Name));
443 
444  return Error::success();
445 }
446 
448  ThreadLocalDataSym &Data) {
449 
450  error(IO.mapInteger(Data.Type));
451  error(IO.mapInteger(Data.DataOffset));
452  error(IO.mapInteger(Data.Segment));
453  error(IO.mapStringZ(Data.Name));
454 
455  return Error::success();
456 }
457 
459 
460  error(IO.mapInteger(UDT.Type));
461  error(IO.mapStringZ(UDT.Name));
462 
463  return Error::success();
464 }
465 
467  UsingNamespaceSym &UN) {
468 
469  error(IO.mapStringZ(UN.Name));
470 
471  return Error::success();
472 }
473 
475  AnnotationSym &Annot) {
476 
477  error(IO.mapInteger(Annot.CodeOffset));
478  error(IO.mapInteger(Annot.Segment));
480  Annot.Strings,
481  [](CodeViewRecordIO &IO, StringRef &S) { return IO.mapStringZ(S); }));
482 
483  return Error::success();
484 }
485 
487  CPUType CPU) {
488  assert(unsigned(EncodedReg) < 4);
489  switch (CPU) {
490  // FIXME: Add ARM and AArch64 variants here.
491  default:
492  break;
493  case CPUType::Intel8080:
494  case CPUType::Intel8086:
495  case CPUType::Intel80286:
496  case CPUType::Intel80386:
497  case CPUType::Intel80486:
498  case CPUType::Pentium:
499  case CPUType::PentiumPro:
500  case CPUType::Pentium3:
501  switch (EncodedReg) {
503  case EncodedFramePtrReg::StackPtr: return RegisterId::VFRAME;
506  }
507  llvm_unreachable("bad encoding");
508  case CPUType::X64:
509  switch (EncodedReg) {
511  case EncodedFramePtrReg::StackPtr: return RegisterId::RSP;
512  case EncodedFramePtrReg::FramePtr: return RegisterId::RBP;
513  case EncodedFramePtrReg::BasePtr: return RegisterId::R13;
514  }
515  llvm_unreachable("bad encoding");
516  }
517  return RegisterId::NONE;
518 }
519 
521  switch (CPU) {
522  // FIXME: Add ARM and AArch64 variants here.
523  default:
524  break;
525  case CPUType::Intel8080:
526  case CPUType::Intel8086:
527  case CPUType::Intel80286:
528  case CPUType::Intel80386:
529  case CPUType::Intel80486:
530  case CPUType::Pentium:
531  case CPUType::PentiumPro:
532  case CPUType::Pentium3:
533  switch (Reg) {
534  case RegisterId::VFRAME:
536  case RegisterId::EBP:
538  case RegisterId::EBX:
540  default:
541  break;
542  }
543  break;
544  case CPUType::X64:
545  switch (Reg) {
546  case RegisterId::RSP:
548  case RegisterId::RBP:
550  case RegisterId::R13:
552  default:
553  break;
554  }
555  break;
556  }
558 }
llvm::codeview::RegisterSym
Definition: SymbolRecord.h:378
llvm::codeview::TrampolineSym::Size
uint16_t Size
Definition: SymbolRecord.h:97
SymbolRecordMapping.h
llvm::N86::EBP
@ EBP
Definition: X86MCTargetDesc.h:51
llvm::N86::EBX
@ EBX
Definition: X86MCTargetDesc.h:51
llvm::codeview::DefRangeRegisterHeader::MayHaveNoName
ulittle16_t MayHaveNoName
Definition: SymbolRecord.h:481
llvm::codeview::AnnotationSym::Segment
uint16_t Segment
Definition: SymbolRecord.h:1000
llvm::codeview::FrameCookieSym::CookieKind
FrameCookieKind CookieKind
Definition: SymbolRecord.h:857
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::pdb::PDB_DataKind::FileStatic
@ FileStatic
llvm::codeview::Compile2Sym::VersionFrontendMajor
uint16_t VersionFrontendMajor
Definition: SymbolRecord.h:712
Reg
unsigned Reg
Definition: MachineSink.cpp:1566
llvm::InlineSite
std::tuple< uint64_t, uint32_t > InlineSite
Definition: MCPseudoProbe.h:100
llvm::codeview::DefRangeSym::Range
LocalVariableAddrRange Range
Definition: SymbolRecord.h:451
llvm::codeview::LocalVariableAddrRange::Range
uint16_t Range
Definition: SymbolRecord.h:426
llvm::codeview::ProcRefSym::Name
StringRef Name
Definition: SymbolRecord.h:403
llvm::codeview::FrameProcSym::Flags
FrameProcedureOptions Flags
Definition: SymbolRecord.h:781
llvm::codeview::ExportSym
Definition: SymbolRecord.h:673
llvm::codeview::SectionSym
Definition: SymbolRecord.h:107
llvm::codeview::PublicSym32
Definition: SymbolRecord.h:361
llvm::codeview::ProcSym::Flags
ProcSymFlags Flags
Definition: SymbolRecord.h:63
llvm::pdb::PDB_SymType::CoffGroup
@ CoffGroup
llvm::codeview::TrampolineSym
Definition: SymbolRecord.h:90
llvm::codeview::DefRangeSubfieldSym::Gaps
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:474
llvm::codeview::CodeViewRecordIO::mapByteVectorTail
Error mapByteVectorTail(ArrayRef< uint8_t > &Bytes, const Twine &Comment="")
Definition: CodeViewRecordIO.cpp:100
llvm::codeview::DefRangeSubfieldRegisterSym::Hdr
DefRangeSubfieldRegisterHeader Hdr
Definition: SymbolRecord.h:518
llvm::codeview::DataSym
Definition: SymbolRecord.h:936
llvm::codeview::HeapAllocationSiteSym::CodeOffset
uint32_t CodeOffset
Definition: SymbolRecord.h:834
llvm::Error::success
static ErrorSuccess success()
Create a success value.
Definition: Error.h:331
llvm::codeview::HeapAllocationSiteSym::Type
TypeIndex Type
Definition: SymbolRecord.h:837
mapLocalVariableAddrRange
static Error mapLocalVariableAddrRange(CodeViewRecordIO &IO, LocalVariableAddrRange &Range)
Definition: SymbolRecordMapping.cpp:28
llvm::codeview::ProcSym::FunctionType
TypeIndex FunctionType
Definition: SymbolRecord.h:60
llvm::codeview::CodeViewRecordIO::mapStringZ
Error mapStringZ(StringRef &Value, const Twine &Comment="")
Definition: CodeViewRecordIO.cpp:207
llvm::codeview::ProcSym::Parent
uint32_t Parent
Definition: SymbolRecord.h:54
llvm::codeview::DefRangeSubfieldRegisterHeader::MayHaveNoName
ulittle16_t MayHaveNoName
Definition: SymbolRecord.h:503
llvm::codeview::DefRangeFramePointerRelFullScopeSym::Offset
int32_t Offset
Definition: SymbolRecord.h:595
llvm::codeview::Compile2Sym::VersionBackendBuild
uint16_t VersionBackendBuild
Definition: SymbolRecord.h:717
llvm::codeview::ObjNameSym
Definition: SymbolRecord.h:645
llvm::codeview::UsingNamespaceSym
Definition: SymbolRecord.h:979
error
#define error(X)
Definition: SymbolRecordMapping.cpp:14
llvm::codeview::EncodedFramePtrReg::None
@ None
llvm::codeview::CodeViewRecordIO::mapEnum
Error mapEnum(T &Value, const Twine &Comment="")
Definition: CodeViewRecordIO.h:114
llvm::codeview::CodeViewRecordIO::padToAlignment
Error padToAlignment(uint32_t Align)
Definition: CodeViewRecordIO.cpp:79
llvm::codeview::EncodedFramePtrReg::StackPtr
@ StackPtr
llvm::codeview::CPUType::Intel80486
@ Intel80486
llvm::codeview::CPUType::X64
@ X64
visitKnownRecord
static Error visitKnownRecord(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
Definition: CVSymbolVisitor.cpp:21
llvm::codeview::CPUType::Intel8080
@ Intel8080
llvm::codeview::MemberAccess::Public
@ Public
llvm::codeview::BuildInfoSym
Definition: SymbolRecord.h:877
llvm::codeview::RecordPrefix
Definition: RecordSerialization.h:33
llvm::Data
@ Data
Definition: SIMachineScheduler.h:56
llvm::codeview::TrampolineSym::ThunkSection
uint16_t ThunkSection
Definition: SymbolRecord.h:100
llvm::codeview::LocalVariableAddrGap
Definition: SymbolRecord.h:429
llvm::codeview::DefRangeRegisterSym::Hdr
DefRangeRegisterHeader Hdr
Definition: SymbolRecord.h:494
llvm::codeview::CPUType::Intel80286
@ Intel80286
llvm::codeview::MaxRecordLength
@ MaxRecordLength
Definition: RecordSerialization.h:31
llvm::codeview::CoffGroupSym
Definition: SymbolRecord.h:124
llvm::codeview::FrameProcSym::OffsetToPadding
uint32_t OffsetToPadding
Definition: SymbolRecord.h:777
llvm::codeview::ObjNameSym::Name
StringRef Name
Definition: SymbolRecord.h:654
llvm::ARMBuildAttrs::Section
@ Section
Legacy Tags.
Definition: ARMBuildAttributes.h:78
llvm::codeview::ScopeEndSym
Definition: SymbolRecord.h:139
llvm::codeview::CodeViewRecordIO::beginRecord
Error beginRecord(Optional< uint32_t > MaxLength)
Definition: CodeViewRecordIO.cpp:18
llvm::codeview::EncodedFramePtrReg
EncodedFramePtrReg
Two-bit value indicating which register is the designated frame pointer register.
Definition: CodeView.h:539
llvm::codeview::Compile3Sym::VersionFrontendMajor
uint16_t VersionFrontendMajor
Definition: SymbolRecord.h:738
llvm::codeview::EncodedFramePtrReg::FramePtr
@ FramePtr
llvm::codeview::DefRangeSym::Program
uint32_t Program
Definition: SymbolRecord.h:450
llvm::codeview::LocalVariableAddrGap::GapStartOffset
uint16_t GapStartOffset
Definition: SymbolRecord.h:430
llvm::codeview::Compile2Sym::VersionFrontendMinor
uint16_t VersionFrontendMinor
Definition: SymbolRecord.h:713
llvm::codeview::ConstantSym
Definition: SymbolRecord.h:921
llvm::codeview::CPUType::Pentium
@ Pentium
llvm::codeview::Compile3Sym::VersionBackendBuild
uint16_t VersionBackendBuild
Definition: SymbolRecord.h:744
llvm::codeview::DefRangeRegisterRelHeader::BasePointerOffset
little32_t BasePointerOffset
Definition: SymbolRecord.h:554
llvm::codeview::ProcSym::End
uint32_t End
Definition: SymbolRecord.h:55
llvm::pdb::PDB_LocType::RegRel
@ RegRel
llvm::codeview::Compile2Sym::Machine
CPUType Machine
Definition: SymbolRecord.h:711
llvm::codeview::Compile3Sym::VersionFrontendMinor
uint16_t VersionFrontendMinor
Definition: SymbolRecord.h:739
llvm::codeview::CodeViewRecordIO
Definition: CodeViewRecordIO.h:43
llvm::codeview::InlineSiteSym
Definition: SymbolRecord.h:333
llvm::codeview::CallSiteInfoSym::Segment
uint16_t Segment
Definition: SymbolRecord.h:814
llvm::codeview::HeapAllocationSiteSym::Segment
uint16_t Segment
Definition: SymbolRecord.h:835
llvm::codeview::EnvBlockSym
Definition: SymbolRecord.h:660
llvm::codeview::EnvBlockSym::Fields
std::vector< StringRef > Fields
Definition: SymbolRecord.h:667
llvm::codeview::CodeViewRecordIO::mapObject
Error mapObject(T &Value)
Definition: CodeViewRecordIO.h:81
llvm::codeview::SymbolRecordMapping::visitSymbolEnd
Error visitSymbolEnd(CVSymbol &Record) override
Definition: SymbolRecordMapping.cpp:41
llvm::codeview::ThreadLocalDataSym
Definition: SymbolRecord.h:957
llvm::codeview::LocalVariableAddrRange
Definition: SymbolRecord.h:423
llvm::codeview::CallSiteInfoSym::Type
TypeIndex Type
Definition: SymbolRecord.h:815
llvm::pdb::PDB_SymType::UDT
@ UDT
llvm::codeview::LocalVariableAddrRange::ISectStart
uint16_t ISectStart
Definition: SymbolRecord.h:425
llvm::codeview::Compile3Sym::Version
StringRef Version
Definition: SymbolRecord.h:746
llvm::codeview::CallSiteInfoSym
Definition: SymbolRecord.h:801
llvm::codeview::Compile3Sym::VersionFrontendQFE
uint16_t VersionFrontendQFE
Definition: SymbolRecord.h:741
llvm::pdb::PDB_SymType::Caller
@ Caller
llvm::codeview::DefRangeRegisterRelSym::Gaps
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:581
llvm::codeview::EncodedFramePtrReg::BasePtr
@ BasePtr
llvm::codeview::DefRangeSubfieldRegisterSym::Range
LocalVariableAddrRange Range
Definition: SymbolRecord.h:519
llvm::codeview::CallerSym
Definition: SymbolRecord.h:148
llvm::codeview::Thunk32Sym
Definition: SymbolRecord.h:70
llvm::codeview::FrameProcSym::OffsetOfExceptionHandler
uint32_t OffsetOfExceptionHandler
Definition: SymbolRecord.h:779
llvm::codeview::DefRangeRegisterHeader::Register
ulittle16_t Register
Definition: SymbolRecord.h:480
llvm::codeview::DefRangeFramePointerRelSym::Range
LocalVariableAddrRange Range
Definition: SymbolRecord.h:545
llvm::codeview::CodeViewRecordIO::mapVectorN
Error mapVectorN(T &Items, const ElementMapper &Mapper, const Twine &Comment="")
Definition: CodeViewRecordIO.h:143
llvm::codeview::LocalSym
Definition: SymbolRecord.h:410
llvm::codeview::TrampolineSym::Type
TrampolineType Type
Definition: SymbolRecord.h:96
llvm::codeview::UsingNamespaceSym::Name
StringRef Name
Definition: SymbolRecord.h:986
llvm::codeview::ProcSym
Definition: SymbolRecord.h:42
llvm::codeview::FrameProcSym::BytesOfCalleeSavedRegisters
uint32_t BytesOfCalleeSavedRegisters
Definition: SymbolRecord.h:778
llvm::Value::Value
Value(Type *Ty, unsigned scid)
Definition: Value.cpp:53
llvm::codeview::alignOf
uint32_t alignOf(CodeViewContainer Container)
Definition: CodeView.h:609
llvm::codeview::DefRangeSubfieldRegisterHeader::Register
ulittle16_t Register
Definition: SymbolRecord.h:502
llvm::codeview::DefRangeSubfieldRegisterSym::Gaps
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:520
llvm::codeview::CodeViewRecordIO::mapStringZVectorZ
Error mapStringZVectorZ(std::vector< StringRef > &Value, const Twine &Comment="")
Definition: CodeViewRecordIO.cpp:252
llvm::Constant
This is an important base class in LLVM.
Definition: Constant.h:41
llvm::codeview::ProcRefSym::SymOffset
uint32_t SymOffset
Definition: SymbolRecord.h:401
llvm::codeview::FrameCookieSym::Register
uint16_t Register
Definition: SymbolRecord.h:856
llvm::codeview::DefRangeRegisterSym
Definition: SymbolRecord.h:485
llvm::codeview::Compile2Sym::Version
StringRef Version
Definition: SymbolRecord.h:718
llvm::codeview::ProcSym::Name
StringRef Name
Definition: SymbolRecord.h:64
llvm::codeview::Compile3Sym::VersionFrontendBuild
uint16_t VersionFrontendBuild
Definition: SymbolRecord.h:740
llvm::codeview::ProcSym::DbgEnd
uint32_t DbgEnd
Definition: SymbolRecord.h:59
llvm::codeview::ProcSym::Segment
uint16_t Segment
Definition: SymbolRecord.h:62
llvm::codeview::CPUType::Intel8086
@ Intel8086
llvm::codeview::TrampolineSym::ThunkOffset
uint32_t ThunkOffset
Definition: SymbolRecord.h:98
llvm::codeview::HeapAllocationSiteSym::CallInstructionSize
uint16_t CallInstructionSize
Definition: SymbolRecord.h:836
llvm::codeview::DefRangeFramePointerRelFullScopeSym
Definition: SymbolRecord.h:587
llvm::codeview::DefRangeRegisterRelSym::Hdr
DefRangeRegisterRelHeader Hdr
Definition: SymbolRecord.h:579
llvm::codeview::LocalVariableAddrRange::OffsetStart
uint32_t OffsetStart
Definition: SymbolRecord.h:424
llvm::codeview::DefRangeSubfieldRegisterSym
Definition: SymbolRecord.h:508
llvm::codeview::Compile3Sym::Machine
CPUType Machine
Definition: SymbolRecord.h:737
llvm::codeview::BPRelativeSym::Offset
int32_t Offset
Definition: SymbolRecord.h:897
llvm::codeview::Compile3Sym::VersionBackendMinor
uint16_t VersionBackendMinor
Definition: SymbolRecord.h:743
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::codeview::DefRangeRegisterRelSym::Range
LocalVariableAddrRange Range
Definition: SymbolRecord.h:580
llvm::codeview::FileStaticSym
Definition: SymbolRecord.h:687
llvm::codeview::FrameCookieSym::CodeOffset
uint32_t CodeOffset
Definition: SymbolRecord.h:855
llvm::codeview::AnnotationSym
Definition: SymbolRecord.h:992
llvm::codeview::RegisterId
RegisterId
Definition: CodeView.h:517
llvm::codeview::TrampolineSym::TargetSection
uint16_t TargetSection
Definition: SymbolRecord.h:101
llvm::Record
Definition: Record.h:1472
llvm::codeview::SymbolRecordMapping::visitSymbolBegin
Error visitSymbolBegin(CVSymbol &Record) override
Definition: SymbolRecordMapping.cpp:36
llvm::codeview::FrameCookieSym
Definition: SymbolRecord.h:843
llvm::codeview::FrameProcSym
Definition: SymbolRecord.h:768
llvm::codeview::encodeFramePtrReg
EncodedFramePtrReg encodeFramePtrReg(RegisterId Reg, CPUType CPU)
Definition: SymbolRecordMapping.cpp:520
llvm::codeview::AnnotationSym::CodeOffset
uint32_t CodeOffset
Definition: SymbolRecord.h:999
llvm::codeview::Compile3Sym::VersionBackendMajor
uint16_t VersionBackendMajor
Definition: SymbolRecord.h:742
llvm::codeview::ObjNameSym::Signature
uint32_t Signature
Definition: SymbolRecord.h:653
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::codeview::Compile2Sym::ExtraStrings
std::vector< StringRef > ExtraStrings
Definition: SymbolRecord.h:719
llvm::codeview::CVRecord
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
Definition: CVRecord.h:30
llvm::codeview::Compile3Sym::Flags
CompileSym3Flags Flags
Definition: SymbolRecord.h:736
llvm::codeview::LabelSym
Definition: SymbolRecord.h:624
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:136
llvm::codeview::DefRangeRegisterSym::Gaps
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:496
llvm::codeview::HeapAllocationSiteSym
Definition: SymbolRecord.h:821
llvm::codeview::Compile2Sym::VersionBackendMinor
uint16_t VersionBackendMinor
Definition: SymbolRecord.h:716
uint32_t
llvm::codeview::DefRangeFramePointerRelSym
Definition: SymbolRecord.h:530
llvm::codeview::BPRelativeSym::Name
StringRef Name
Definition: SymbolRecord.h:899
llvm::codeview::ProcRefSym::SumName
uint32_t SumName
Definition: SymbolRecord.h:400
llvm::codeview::CodeViewRecordIO::mapInteger
Error mapInteger(TypeIndex &TypeInd, const Twine &Comment="")
Definition: CodeViewRecordIO.cpp:127
llvm::codeview::DefRangeRegisterRelSym
Definition: SymbolRecord.h:558
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::codeview::FrameProcSym::PaddingFrameBytes
uint32_t PaddingFrameBytes
Definition: SymbolRecord.h:776
llvm::codeview::DefRangeSym::Gaps
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:452
llvm::codeview::Compile2Sym::Flags
CompileSym2Flags Flags
Definition: SymbolRecord.h:710
llvm::codeview::DefRangeSubfieldSym::Program
uint32_t Program
Definition: SymbolRecord.h:471
llvm::codeview::CPUType::Intel80386
@ Intel80386
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
llvm::pdb::PDB_DataKind::Local
@ Local
llvm::codeview::CPUType::PentiumPro
@ PentiumPro
llvm::codeview::DefRangeSubfieldSym
Definition: SymbolRecord.h:458
llvm::codeview::ProcSym::CodeOffset
uint32_t CodeOffset
Definition: SymbolRecord.h:61
llvm::pdb::PDB_SymType::Label
@ Label
llvm::codeview::AnnotationSym::Strings
std::vector< StringRef > Strings
Definition: SymbolRecord.h:1001
llvm::codeview::CodeViewRecordIO::mapEncodedInteger
Error mapEncodedInteger(int64_t &Value, const Twine &Comment="")
Definition: CodeViewRecordIO.cpp:148
uint16_t
llvm::codeview::CodeViewRecordIO::endRecord
Error endRecord()
Definition: CodeViewRecordIO.cpp:26
llvm::codeview::Compile3Sym
Definition: SymbolRecord.h:728
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::codeview::DefRangeRegisterRelHeader::Flags
ulittle16_t Flags
Definition: SymbolRecord.h:553
llvm::codeview::ProcSym::DbgStart
uint32_t DbgStart
Definition: SymbolRecord.h:58
llvm::codeview::CPUType
CPUType
These values correspond to the CV_CPU_TYPE_e enumeration, and are documented here: https://msdn....
Definition: CodeView.h:78
llvm::codeview::Compile3Sym::VersionBackendQFE
uint16_t VersionBackendQFE
Definition: SymbolRecord.h:745
llvm::codeview::BPRelativeSym::Type
TypeIndex Type
Definition: SymbolRecord.h:898
llvm::codeview::BPRelativeSym
Definition: SymbolRecord.h:890
llvm::codeview::BlockSym
Definition: SymbolRecord.h:601
llvm::codeview::DefRangeFramePointerRelSym::Gaps
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:546
llvm::codeview::DefRangeSubfieldRegisterHeader::OffsetInParent
ulittle32_t OffsetInParent
Definition: SymbolRecord.h:504
llvm::codeview::TrampolineSym::TargetOffset
uint32_t TargetOffset
Definition: SymbolRecord.h:99
llvm::codeview
Definition: AppendingTypeTableBuilder.h:22
llvm::codeview::RegRelativeSym
Definition: SymbolRecord.h:905
llvm::codeview::FrameProcSym::SectionIdOfExceptionHandler
uint16_t SectionIdOfExceptionHandler
Definition: SymbolRecord.h:780
llvm::codeview::ProcRefSym::Module
uint16_t Module
Definition: SymbolRecord.h:402
llvm::NONE
@ NONE
Definition: Attributor.h:4614
N
#define N
llvm::codeview::Compile2Sym::VersionFrontendBuild
uint16_t VersionFrontendBuild
Definition: SymbolRecord.h:714
llvm::codeview::DefRangeFramePointerRelSym::Hdr
DefRangeFramePointerRelHeader Hdr
Definition: SymbolRecord.h:544
llvm::PseudoProbeAttributes::Reserved
@ Reserved
llvm::codeview::Compile2Sym::VersionBackendMajor
uint16_t VersionBackendMajor
Definition: SymbolRecord.h:715
llvm::codeview::DefRangeSym
Definition: SymbolRecord.h:437
llvm::codeview::Compile2Sym
Definition: SymbolRecord.h:703
llvm::codeview::TypeIndex
A 32-bit type reference.
Definition: TypeIndex.h:95
llvm::codeview::ProcSym::Next
uint32_t Next
Definition: SymbolRecord.h:56
llvm::codeview::DefRangeRegisterSym::Range
LocalVariableAddrRange Range
Definition: SymbolRecord.h:495
llvm::Register::Register
constexpr Register(unsigned Val=0)
Definition: Register.h:23
llvm::codeview::ProcRefSym
Definition: SymbolRecord.h:393
llvm::codeview::FrameProcSym::TotalFrameBytes
uint32_t TotalFrameBytes
Definition: SymbolRecord.h:775
llvm::codeview::CallSiteInfoSym::CodeOffset
uint32_t CodeOffset
Definition: SymbolRecord.h:813
llvm::codeview::BuildInfoSym::BuildId
TypeIndex BuildId
Definition: SymbolRecord.h:884
llvm::codeview::DefRangeRegisterRelHeader::Register
ulittle16_t Register
Definition: SymbolRecord.h:552
llvm::codeview::DefRangeFramePointerRelHeader::Offset
little32_t Offset
Definition: SymbolRecord.h:526
llvm::codeview::CodeViewRecordIO::mapVectorTail
Error mapVectorTail(T &Items, const ElementMapper &Mapper, const Twine &Comment="")
Definition: CodeViewRecordIO.h:180
llvm::codeview::DefRangeSubfieldSym::Range
LocalVariableAddrRange Range
Definition: SymbolRecord.h:473
llvm::codeview::CPUType::Pentium3
@ Pentium3
llvm::pdb::PDB_SymType::Export
@ Export
llvm::codeview::ProcSym::CodeSize
uint32_t CodeSize
Definition: SymbolRecord.h:57
llvm::codeview::LocalVariableAddrGap::Range
uint16_t Range
Definition: SymbolRecord.h:431
llvm::codeview::UDTSym
Definition: SymbolRecord.h:864
llvm::codeview::FrameCookieSym::Flags
uint8_t Flags
Definition: SymbolRecord.h:858
llvm::codeview::decodeFramePtrReg
RegisterId decodeFramePtrReg(EncodedFramePtrReg EncodedReg, CPUType CPU)
Definition: SymbolRecordMapping.cpp:486
llvm::codeview::DefRangeSubfieldSym::OffsetInParent
uint16_t OffsetInParent
Definition: SymbolRecord.h:472