Skip to content

Commit 15ac727

Browse files
committed
Fix build bot failures.
Unfortunately, not all compilers allow using llvm_unreachable in a constexpr function.
1 parent 1b15965 commit 15ac727

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/include/llvm/BinaryFormat/Dwarf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ unsigned LanguageVendor(SourceLanguage L);
533533
Optional<unsigned> LanguageLowerBound(SourceLanguage L);
534534

535535
/// The size of a reference determined by the DWARF 32/64-bit format.
536-
constexpr uint8_t getDwarfOffsetByteSize(DwarfFormat Format) {
536+
inline uint8_t getDwarfOffsetByteSize(DwarfFormat Format) {
537537
switch (Format) {
538538
case DwarfFormat::DWARF32:
539539
return 4;
@@ -569,7 +569,7 @@ struct FormParams {
569569
};
570570

571571
/// Get the byte size of the unit length field depending on the DWARF format.
572-
constexpr uint8_t getUnitLengthFieldByteSize(DwarfFormat Format) {
572+
inline uint8_t getUnitLengthFieldByteSize(DwarfFormat Format) {
573573
switch (Format) {
574574
case DwarfFormat::DWARF32:
575575
return 4;

llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ Error DWARFDebugArangeSet::extract(DataExtractor data, uint64_t *offset_ptr) {
6262
constexpr unsigned CommonFieldsLength = 2 + // Version
6363
1 + // Address Size
6464
1; // Segment Selector Size
65-
constexpr unsigned DWARF32HeaderLength =
65+
static const unsigned DWARF32HeaderLength =
6666
dwarf::getUnitLengthFieldByteSize(dwarf::DWARF32) + CommonFieldsLength +
6767
dwarf::getDwarfOffsetByteSize(dwarf::DWARF32); // Debug Info Offset
68-
constexpr unsigned DWARF64HeaderLength =
68+
static const unsigned DWARF64HeaderLength =
6969
dwarf::getUnitLengthFieldByteSize(dwarf::DWARF64) + CommonFieldsLength +
7070
dwarf::getDwarfOffsetByteSize(dwarf::DWARF64); // Debug Info Offset
7171

0 commit comments

Comments
 (0)