Skip to content

Commit e50b286

Browse files
author
Greg Clayton
committed
Fix windows buildbot where warnings are errors. We had a switch statement where all enumerations were handled, but some compilers don't recognize this. Simplify the logic so that all compilers will know a return value is returned in all cases.
llvm-svn: 286600
1 parent 1805298 commit e50b286

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,9 @@ class DWARFUnit {
204204
return getDwarfOffsetByteSize();
205205
}
206206
uint8_t getDwarfOffsetByteSize() const {
207-
switch (getFormat()) {
208-
case dwarf::DwarfFormat::DWARF32:
209-
return 4;
210-
case dwarf::DwarfFormat::DWARF64:
207+
if (getFormat() == dwarf::DwarfFormat::DWARF64)
211208
return 8;
212-
}
209+
return 4;
213210
}
214211
uint64_t getBaseAddress() const { return BaseAddr; }
215212

0 commit comments

Comments
 (0)