[Lldb-commits] [lldb] r367946 - [CompilerType] Remove an unused function.
Davide Italiano via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 5 16:18:00 PDT 2019
Author: davide
Date: Mon Aug 5 16:18:00 2019
New Revision: 367946
URL: http://llvm.org/viewvc/llvm-project?rev=367946&view=rev
Log:
[CompilerType] Remove an unused function.
Summary:
This simplifies the interface, as I'm trying to understand how
we can upstream swift support.
<rdar://problem/36377967>
Reviewers: teemperor, JDevlieghere, xiaobai, compnerd, friss
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D65781
Modified:
lldb/trunk/include/lldb/Symbol/ClangASTContext.h
lldb/trunk/include/lldb/Symbol/CompilerType.h
lldb/trunk/include/lldb/Symbol/TypeSystem.h
lldb/trunk/source/Symbol/ClangASTContext.cpp
lldb/trunk/source/Symbol/CompilerType.cpp
Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=367946&r1=367945&r2=367946&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Mon Aug 5 16:18:00 2019
@@ -879,12 +879,6 @@ public:
static CompilerType CreateMemberPointerType(const CompilerType &type,
const CompilerType &pointee_type);
- // Converts "s" to a floating point value and place resulting floating point
- // bytes in the "dst" buffer.
- size_t ConvertStringToFloatValue(lldb::opaque_compiler_type_t type,
- const char *s, uint8_t *dst,
- size_t dst_size) override;
-
// Dumping types
#ifndef NDEBUG
/// Convenience LLVM-style dump method for use in the debugger only.
Modified: lldb/trunk/include/lldb/Symbol/CompilerType.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/CompilerType.h?rev=367946&r1=367945&r2=367946&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/CompilerType.h (original)
+++ lldb/trunk/include/lldb/Symbol/CompilerType.h Mon Aug 5 16:18:00 2019
@@ -336,13 +336,6 @@ public:
bool IsMeaninglessWithoutDynamicResolution() const;
- // Pointers & References
-
- // Converts "s" to a floating point value and place resulting floating point
- // bytes in the "dst" buffer.
- size_t ConvertStringToFloatValue(const char *s, uint8_t *dst,
- size_t dst_size) const;
-
// Dumping types
#ifndef NDEBUG
Modified: lldb/trunk/include/lldb/Symbol/TypeSystem.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TypeSystem.h?rev=367946&r1=367945&r2=367946&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/TypeSystem.h (original)
+++ lldb/trunk/include/lldb/Symbol/TypeSystem.h Mon Aug 5 16:18:00 2019
@@ -376,12 +376,6 @@ public:
lldb::offset_t data_offset,
size_t data_byte_size) = 0;
- // Converts "s" to a floating point value and place resulting floating point
- // bytes in the "dst" buffer.
- virtual size_t ConvertStringToFloatValue(lldb::opaque_compiler_type_t type,
- const char *s, uint8_t *dst,
- size_t dst_size) = 0;
-
// TODO: Determine if these methods should move to ClangASTContext.
virtual bool IsPointerOrReferenceType(lldb::opaque_compiler_type_t type,
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=367946&r1=367945&r2=367946&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Mon Aug 5 16:18:00 2019
@@ -9067,39 +9067,6 @@ ClangASTContext::CreateMemberPointerType
return CompilerType();
}
-size_t
-ClangASTContext::ConvertStringToFloatValue(lldb::opaque_compiler_type_t type,
- const char *s, uint8_t *dst,
- size_t dst_size) {
- if (type) {
- clang::QualType qual_type(GetCanonicalQualType(type));
- uint32_t count = 0;
- bool is_complex = false;
- if (IsFloatingPointType(type, count, is_complex)) {
- // TODO: handle complex and vector types
- if (count != 1)
- return false;
-
- llvm::StringRef s_sref(s);
- llvm::APFloat ap_float(getASTContext()->getFloatTypeSemantics(qual_type),
- s_sref);
-
- const uint64_t bit_size = getASTContext()->getTypeSize(qual_type);
- const uint64_t byte_size = bit_size / 8;
- if (dst_size >= byte_size) {
- Scalar scalar = ap_float.bitcastToAPInt().zextOrTrunc(
- llvm::NextPowerOf2(byte_size) * 8);
- lldb_private::Status get_data_error;
- if (scalar.GetAsMemoryData(dst, byte_size,
- lldb_private::endian::InlHostByteOrder(),
- get_data_error))
- return byte_size;
- }
- }
- }
- return 0;
-}
-
// Dumping types
#define DEPTH_INCREMENT 2
Modified: lldb/trunk/source/Symbol/CompilerType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompilerType.cpp?rev=367946&r1=367945&r2=367946&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/CompilerType.cpp (original)
+++ lldb/trunk/source/Symbol/CompilerType.cpp Mon Aug 5 16:18:00 2019
@@ -729,13 +729,6 @@ CompilerType::GetIndexOfChildWithName(co
return UINT32_MAX;
}
-size_t CompilerType::ConvertStringToFloatValue(const char *s, uint8_t *dst,
- size_t dst_size) const {
- if (IsValid())
- return m_type_system->ConvertStringToFloatValue(m_type, s, dst, dst_size);
- return 0;
-}
-
// Dumping types
#define DEPTH_INCREMENT 2
More information about the lldb-commits
mailing list