forked from OSchip/llvm-project
Fix build bot failures.
Unfortunately, not all compilers allow using llvm_unreachable in a constexpr function.
This commit is contained in:
parent
1b15965932
commit
15ac727714
|
@ -533,7 +533,7 @@ unsigned LanguageVendor(SourceLanguage L);
|
|||
Optional<unsigned> LanguageLowerBound(SourceLanguage L);
|
||||
|
||||
/// The size of a reference determined by the DWARF 32/64-bit format.
|
||||
constexpr uint8_t getDwarfOffsetByteSize(DwarfFormat Format) {
|
||||
inline uint8_t getDwarfOffsetByteSize(DwarfFormat Format) {
|
||||
switch (Format) {
|
||||
case DwarfFormat::DWARF32:
|
||||
return 4;
|
||||
|
@ -569,7 +569,7 @@ struct FormParams {
|
|||
};
|
||||
|
||||
/// Get the byte size of the unit length field depending on the DWARF format.
|
||||
constexpr uint8_t getUnitLengthFieldByteSize(DwarfFormat Format) {
|
||||
inline uint8_t getUnitLengthFieldByteSize(DwarfFormat Format) {
|
||||
switch (Format) {
|
||||
case DwarfFormat::DWARF32:
|
||||
return 4;
|
||||
|
|
|
@ -62,10 +62,10 @@ Error DWARFDebugArangeSet::extract(DataExtractor data, uint64_t *offset_ptr) {
|
|||
constexpr unsigned CommonFieldsLength = 2 + // Version
|
||||
1 + // Address Size
|
||||
1; // Segment Selector Size
|
||||
constexpr unsigned DWARF32HeaderLength =
|
||||
static const unsigned DWARF32HeaderLength =
|
||||
dwarf::getUnitLengthFieldByteSize(dwarf::DWARF32) + CommonFieldsLength +
|
||||
dwarf::getDwarfOffsetByteSize(dwarf::DWARF32); // Debug Info Offset
|
||||
constexpr unsigned DWARF64HeaderLength =
|
||||
static const unsigned DWARF64HeaderLength =
|
||||
dwarf::getUnitLengthFieldByteSize(dwarf::DWARF64) + CommonFieldsLength +
|
||||
dwarf::getDwarfOffsetByteSize(dwarf::DWARF64); // Debug Info Offset
|
||||
|
||||
|
|
Loading…
Reference in New Issue