summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandr Urakov <aleksandr.urakov@jetbrains.com>2018-08-17 07:28:24 +0000
committerAleksandr Urakov <aleksandr.urakov@jetbrains.com>2018-08-17 07:28:24 +0000
commit534594822f786bc93907b6fa5c58f00a6175df47 (patch)
tree6c8e076761daac7c50668985f004c0e9a426586e
parent7b78d3920c713de2555b5d0f476bc31a0d9aac5d (diff)
downloadbcm5719-llvm-534594822f786bc93907b6fa5c58f00a6175df47.tar.gz
bcm5719-llvm-534594822f786bc93907b6fa5c58f00a6175df47.zip
Fix compiler warnings after rL339649.
Differential Revision: https://reviews.llvm.org/D49980 llvm-svn: 339994
-rw-r--r--lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp9
-rw-r--r--lldb/source/Symbol/ClangASTContext.cpp8
2 files changed, 7 insertions, 10 deletions
diff --git a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
index 713fa6e6703..4c469e84969 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
+++ b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
@@ -52,9 +52,8 @@ int TranslateUdtKind(PDB_UdtType pdb_kind) {
return clang::TTK_Union;
case PDB_UdtType::Interface:
return clang::TTK_Interface;
- default:
- llvm_unreachable("unsuported PDB UDT type");
}
+ llvm_unreachable("unsuported PDB UDT type");
}
lldb::Encoding TranslateBuiltinEncoding(PDB_BuiltinType type) {
@@ -213,9 +212,8 @@ AccessType TranslateMemberAccess(PDB_MemberAccess access) {
return eAccessProtected;
case PDB_MemberAccess::Public:
return eAccessPublic;
- default:
- return eAccessNone;
}
+ return eAccessNone;
}
AccessType GetDefaultAccessibilityForUdtKind(PDB_UdtType udt_kind) {
@@ -226,9 +224,8 @@ AccessType GetDefaultAccessibilityForUdtKind(PDB_UdtType udt_kind) {
case PDB_UdtType::Class:
case PDB_UdtType::Interface:
return eAccessPrivate;
- default:
- llvm_unreachable("unsupported PDB UDT type");
}
+ llvm_unreachable("unsupported PDB UDT type");
}
AccessType GetAccessibilityForUdt(const PDBSymbolTypeUDT &udt) {
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 043aaa3f2e2..7f617dcf676 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -6543,8 +6543,8 @@ CompilerType ClangASTContext::GetChildCompilerTypeAtIndex(
vbtable_ptr + vbtable_index * 4;
const int32_t base_offset =
process->ReadSignedIntegerFromMemory(
- base_offset_addr, 4, UINT32_MAX, err);
- if (base_offset != UINT32_MAX) {
+ base_offset_addr, 4, INT32_MAX, err);
+ if (base_offset != INT32_MAX) {
handled = true;
bit_offset = base_offset * 8;
}
@@ -6740,7 +6740,7 @@ CompilerType ClangASTContext::GetChildCompilerTypeAtIndex(
// Setting this to UINT32_MAX to make sure we don't compute it
// twice...
- bit_offset = UINT32_MAX;
+ bit_offset = INT32_MAX;
if (child_byte_offset ==
static_cast<int32_t>(LLDB_INVALID_IVAR_OFFSET)) {
@@ -6757,7 +6757,7 @@ CompilerType ClangASTContext::GetChildCompilerTypeAtIndex(
if (ClangASTContext::FieldIsBitfield(getASTContext(), ivar_decl,
child_bitfield_bit_size)) {
- if (bit_offset == UINT32_MAX)
+ if (bit_offset == INT32_MAX)
bit_offset = interface_layout.getFieldOffset(
child_idx - superclass_idx);
OpenPOWER on IntegriCloud