From: Greg Clayton Date: Fri, 11 Nov 2016 16:55:31 +0000 (+0000) Subject: Fix windows buildbot where warnings are errors. We had a switch statement where all... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0818f49f3d04ed9f7d1cf2af3f7408bad3577cd0;p=llvm 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286600 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/DebugInfo/DWARF/DWARFUnit.h b/include/llvm/DebugInfo/DWARF/DWARFUnit.h index 2093beb2924..e42ab0d63af 100644 --- a/include/llvm/DebugInfo/DWARF/DWARFUnit.h +++ b/include/llvm/DebugInfo/DWARF/DWARFUnit.h @@ -204,12 +204,9 @@ public: return getDwarfOffsetByteSize(); } uint8_t getDwarfOffsetByteSize() const { - switch (getFormat()) { - case dwarf::DwarfFormat::DWARF32: - return 4; - case dwarf::DwarfFormat::DWARF64: + if (getFormat() == dwarf::DwarfFormat::DWARF64) return 8; - } + return 4; } uint64_t getBaseAddress() const { return BaseAddr; }