File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
llvm/include/llvm/BinaryFormat Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -532,6 +532,17 @@ unsigned LanguageVendor(SourceLanguage L);
532
532
533
533
Optional<unsigned > LanguageLowerBound (SourceLanguage L);
534
534
535
+ // / The size of a reference determined by the DWARF 32/64-bit format.
536
+ constexpr uint8_t getDwarfOffsetByteSize (DwarfFormat Format) {
537
+ switch (Format) {
538
+ case DwarfFormat::DWARF32:
539
+ return 4 ;
540
+ case DwarfFormat::DWARF64:
541
+ return 8 ;
542
+ }
543
+ llvm_unreachable (" Invalid Format value" );
544
+ }
545
+
535
546
// / A helper struct providing information about the byte size of DW_FORM
536
547
// / values that vary in size depending on the DWARF version, address byte
537
548
// / size, or DWARF32/DWARF64.
@@ -551,13 +562,7 @@ struct FormParams {
551
562
552
563
// / The size of a reference is determined by the DWARF 32/64-bit format.
553
564
uint8_t getDwarfOffsetByteSize () const {
554
- switch (Format) {
555
- case DwarfFormat::DWARF32:
556
- return 4 ;
557
- case DwarfFormat::DWARF64:
558
- return 8 ;
559
- }
560
- llvm_unreachable (" Invalid Format value" );
565
+ return dwarf::getDwarfOffsetByteSize (Format);
561
566
}
562
567
563
568
explicit operator bool () const { return Version && AddrSize; }
You can’t perform that action at this time.
0 commit comments