summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2016-11-11 16:55:31 +0000
committerGreg Clayton <gclayton@apple.com>2016-11-11 16:55:31 +0000
commite50b286c9e751ec08995411297b520b4d89bb596 (patch)
tree24bbc56aa7e36504faaec11d7be41f99e5f3f622
parent180529892dc4e867d96cd470b09e58073b0c70b3 (diff)
downloadbcm5719-llvm-e50b286c9e751ec08995411297b520b4d89bb596.tar.gz
bcm5719-llvm-e50b286c9e751ec08995411297b520b4d89bb596.zip
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
-rw-r--r--llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
index 2093beb2924..e42ab0d63af 100644
--- a/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
+++ b/llvm/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; }
OpenPOWER on IntegriCloud