aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Expression/Materializer.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2019-08-08 03:15:48 +0000
committerDavide Italiano <davide@freebsd.org>2019-08-08 03:15:48 +0000
commite04c62bb23625a2baccb5c52d1d1f372c41ce5c7 (patch)
tree5aa7531c51b27516d84fb737e09ca2f9f87827f0 /lldb/source/Expression/Materializer.cpp
parent277583ec0ab2d411a3df06d3207ece9b18655d83 (diff)
downloadllvm-e04c62bb23625a2baccb5c52d1d1f372c41ce5c7.zip
llvm-e04c62bb23625a2baccb5c52d1d1f372c41ce5c7.tar.gz
llvm-e04c62bb23625a2baccb5c52d1d1f372c41ce5c7.tar.bz2
[Materializer] Remove wrong SetSizeAndAlignmentFromType().
This function is unused. It's also wrong, because it computes the size and the alignment of the type without asking the runtime, so it doesn't work for any language that has one (e.g. swift). One could consider re-implementing this passing an execution scope context, and modifying GetTypeBitAlign() to do the right thing, but given there are no uses, it's not really useful. llvm-svn: 368249
Diffstat (limited to 'lldb/source/Expression/Materializer.cpp')
-rw-r--r--lldb/source/Expression/Materializer.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/lldb/source/Expression/Materializer.cpp b/lldb/source/Expression/Materializer.cpp
index 291f81e..64dffa3 100644
--- a/lldb/source/Expression/Materializer.cpp
+++ b/lldb/source/Expression/Materializer.cpp
@@ -45,20 +45,6 @@ uint32_t Materializer::AddStructMember(Entity &entity) {
return ret;
}
-void Materializer::Entity::SetSizeAndAlignmentFromType(CompilerType &type) {
- if (llvm::Optional<uint64_t> size = type.GetByteSize(nullptr))
- m_size = *size;
-
- uint32_t bit_alignment = type.GetTypeBitAlign();
-
- if (bit_alignment % 8) {
- bit_alignment += 8;
- bit_alignment &= ~((uint32_t)0x111u);
- }
-
- m_alignment = bit_alignment / 8;
-}
-
class EntityPersistentVariable : public Materializer::Entity {
public:
EntityPersistentVariable(lldb::ExpressionVariableSP &persistent_variable_sp,