diff options
| author | Davide Italiano <davide@freebsd.org> | 2019-08-05 23:18:00 +0000 |
|---|---|---|
| committer | Davide Italiano <davide@freebsd.org> | 2019-08-05 23:18:00 +0000 |
| commit | d32d5db4daca6380d0a36338ecbab6df4b0bc585 (patch) | |
| tree | d579080597ae4bff1223d94bde70ecb01a6fb6be /lldb | |
| parent | bc1172df149ade75cfcebdeec1deea4e386b8d24 (diff) | |
| download | bcm5719-llvm-d32d5db4daca6380d0a36338ecbab6df4b0bc585.tar.gz bcm5719-llvm-d32d5db4daca6380d0a36338ecbab6df4b0bc585.zip | |
[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
llvm-svn: 367946
Diffstat (limited to 'lldb')
| -rw-r--r-- | lldb/include/lldb/Symbol/ClangASTContext.h | 6 | ||||
| -rw-r--r-- | lldb/include/lldb/Symbol/CompilerType.h | 7 | ||||
| -rw-r--r-- | lldb/include/lldb/Symbol/TypeSystem.h | 6 | ||||
| -rw-r--r-- | lldb/source/Symbol/ClangASTContext.cpp | 33 | ||||
| -rw-r--r-- | lldb/source/Symbol/CompilerType.cpp | 7 |
5 files changed, 0 insertions, 59 deletions
diff --git a/lldb/include/lldb/Symbol/ClangASTContext.h b/lldb/include/lldb/Symbol/ClangASTContext.h index b4e01550fe4..8e2b6a3babe 100644 --- a/lldb/include/lldb/Symbol/ClangASTContext.h +++ b/lldb/include/lldb/Symbol/ClangASTContext.h @@ -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. diff --git a/lldb/include/lldb/Symbol/CompilerType.h b/lldb/include/lldb/Symbol/CompilerType.h index 98d916597f4..62ceb1059e0 100644 --- a/lldb/include/lldb/Symbol/CompilerType.h +++ b/lldb/include/lldb/Symbol/CompilerType.h @@ -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 diff --git a/lldb/include/lldb/Symbol/TypeSystem.h b/lldb/include/lldb/Symbol/TypeSystem.h index a0eb5f75f0c..347d1f8f390 100644 --- a/lldb/include/lldb/Symbol/TypeSystem.h +++ b/lldb/include/lldb/Symbol/TypeSystem.h @@ -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, diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index 433ef00335b..ef5d35b0959 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -9067,39 +9067,6 @@ ClangASTContext::CreateMemberPointerType(const CompilerType &type, 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 diff --git a/lldb/source/Symbol/CompilerType.cpp b/lldb/source/Symbol/CompilerType.cpp index bb9a1a642e4..b12c89e749a 100644 --- a/lldb/source/Symbol/CompilerType.cpp +++ b/lldb/source/Symbol/CompilerType.cpp @@ -729,13 +729,6 @@ CompilerType::GetIndexOfChildWithName(const char *name, 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 |

