[llvm] r286600 - 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.
Greg Clayton via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 11 08:55:31 PST 2016
Author: gclayton
Date: Fri Nov 11 10:55:31 2016
New Revision: 286600
URL: http://llvm.org/viewvc/llvm-project?rev=286600&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFUnit.h
Modified: llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFUnit.h?rev=286600&r1=286599&r2=286600&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFUnit.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFUnit.h Fri Nov 11 10:55:31 2016
@@ -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; }
More information about the llvm-commits
mailing list