diff options
Diffstat (limited to 'llvm/tools/llvm-dwp/llvm-dwp.cpp')
-rw-r--r-- | llvm/tools/llvm-dwp/llvm-dwp.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/tools/llvm-dwp/llvm-dwp.cpp b/llvm/tools/llvm-dwp/llvm-dwp.cpp index 571dc62..18cd92f 100644 --- a/llvm/tools/llvm-dwp/llvm-dwp.cpp +++ b/llvm/tools/llvm-dwp/llvm-dwp.cpp @@ -216,11 +216,12 @@ struct UnitIndexEntry { StringRef DWPName; }; -// Convert a section identifier into the index to use with +// Convert an internal section identifier into the index to use with // UnitIndexEntry::Contributions. static unsigned getContributionIndex(DWARFSectionKind Kind) { - assert(Kind >= DW_SECT_INFO); - return Kind - DW_SECT_INFO; + // Assuming the pre-standard DWP format. + assert(serializeSectionKind(Kind, 2) >= DW_SECT_INFO); + return serializeSectionKind(Kind, 2) - DW_SECT_INFO; } // Convert a UnitIndexEntry::Contributions index to the corresponding on-disk |