From faac1118702d8fa7bbd639d23a2c9f79e4db2f0c Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 14 Mar 2013 18:31:44 +0000 Subject: Many "byte size" members and variables were using a mixture of uint32_t and size_t. Switching over to using uint64_t everywhere. llvm-svn: 177091 --- lldb/source/Expression/DWARFExpression.cpp | 2 +- lldb/source/Expression/IRForTarget.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lldb/source/Expression') diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index a6950d6a5dc..82d40af1562 100644 --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -2794,7 +2794,7 @@ DWARFExpression::Evaluate addr_t source_addr = (addr_t)tmp.GetScalar().ULongLong(); addr_t target_addr = (addr_t)stack.back().GetScalar().ULongLong(); - size_t byte_size = (ClangASTType::GetClangTypeBitWidth(ast_context, clang_type) + 7) / 8; + const uint64_t byte_size = ClangASTType::GetTypeByteSize(ast_context, clang_type); switch (source_value_type) { diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp index 8f775a793a5..c7c96f73fbd 100644 --- a/lldb/source/Expression/IRForTarget.cpp +++ b/lldb/source/Expression/IRForTarget.cpp @@ -707,7 +707,7 @@ IRForTarget::CreateResultVariable (llvm::Function &llvm_function) m_result_name = m_decl_map->GetPersistentResultName(); if (log) - log->Printf("Creating a new result global: \"%s\" with size 0x%x", + log->Printf("Creating a new result global: \"%s\" with size 0x%" PRIx64, m_result_name.GetCString(), m_result_type.GetClangTypeBitWidth() / 8); @@ -1674,11 +1674,11 @@ IRForTarget::MaybeHandleVariable (Value *llvm_value_ptr) value_type = global_variable->getType(); } - size_t value_size = (ast_context->getTypeSize(qual_type) + 7) / 8; - off_t value_alignment = (ast_context->getTypeAlign(qual_type) + 7) / 8; + uint64_t value_size = (ast_context->getTypeSize(qual_type) + 7ull) / 8ull; + off_t value_alignment = (ast_context->getTypeAlign(qual_type) + 7ull) / 8ull; if (log) - log->Printf("Type of \"%s\" is [clang \"%s\", llvm \"%s\"] [size %lu, align %" PRId64 "]", + log->Printf("Type of \"%s\" is [clang \"%s\", llvm \"%s\"] [size %" PRIu64 ", align %" PRId64 "]", name.c_str(), qual_type.getAsString().c_str(), PrintType(value_type).c_str(), -- cgit v1.2.3