diff options
Diffstat (limited to 'lldb/source/Symbol')
| -rw-r--r-- | lldb/source/Symbol/CompilerType.cpp | 19 | ||||
| -rw-r--r-- | lldb/source/Symbol/ObjectFile.cpp | 8 | ||||
| -rw-r--r-- | lldb/source/Symbol/Type.cpp | 4 | 
3 files changed, 14 insertions, 17 deletions
diff --git a/lldb/source/Symbol/CompilerType.cpp b/lldb/source/Symbol/CompilerType.cpp index 62c0ddf..c999ab2 100644 --- a/lldb/source/Symbol/CompilerType.cpp +++ b/lldb/source/Symbol/CompilerType.cpp @@ -240,13 +240,11 @@ bool CompilerType::ShouldTreatScalarValueAsAddress() const {    return false;  } -bool CompilerType::IsFloatingPointType(uint32_t &count, -                                       bool &is_complex) const { +bool CompilerType::IsFloatingPointType(bool &is_complex) const {    if (IsValid()) {      if (auto type_system_sp = GetTypeSystem()) -      return type_system_sp->IsFloatingPointType(m_type, count, is_complex); +      return type_system_sp->IsFloatingPointType(m_type, is_complex);    } -  count = 0;    is_complex = false;    return false;  } @@ -331,9 +329,8 @@ bool CompilerType::IsInteger() const {  }  bool CompilerType::IsFloat() const { -  uint32_t count = 0;    bool is_complex = false; -  return IsFloatingPointType(count, is_complex); +  return IsFloatingPointType(is_complex);  }  bool CompilerType::IsEnumerationType() const { @@ -793,10 +790,10 @@ CompilerType::GetTypeBitAlign(ExecutionContextScope *exe_scope) const {    return {};  } -lldb::Encoding CompilerType::GetEncoding(uint64_t &count) const { +lldb::Encoding CompilerType::GetEncoding() const {    if (IsValid())      if (auto type_system_sp = GetTypeSystem()) -      return type_system_sp->GetEncoding(m_type, count); +      return type_system_sp->GetEncoding(m_type);    return lldb::eEncodingInvalid;  } @@ -1093,10 +1090,10 @@ bool CompilerType::GetValueAsScalar(const lldb_private::DataExtractor &data,    if (IsAggregateType()) {      return false; // Aggregate types don't have scalar values    } else { -    uint64_t count = 0; -    lldb::Encoding encoding = GetEncoding(count); +    // FIXME: check that type is scalar instead of checking encoding? +    lldb::Encoding encoding = GetEncoding(); -    if (encoding == lldb::eEncodingInvalid || count != 1) +    if (encoding == lldb::eEncodingInvalid || (GetTypeInfo() & eTypeIsComplex))        return false;      auto byte_size_or_err = GetByteSize(exe_scope); diff --git a/lldb/source/Symbol/ObjectFile.cpp b/lldb/source/Symbol/ObjectFile.cpp index 9a79b3c..6f5348c 100644 --- a/lldb/source/Symbol/ObjectFile.cpp +++ b/lldb/source/Symbol/ObjectFile.cpp @@ -647,14 +647,14 @@ ObjectFile::GetDWARFSectionTypeFromName(llvm::StringRef name) {        .Case("frame", eSectionTypeDWARFDebugFrame)        .Case("info", eSectionTypeDWARFDebugInfo)        .Case("info.dwo", eSectionTypeDWARFDebugInfoDwo) -      .Cases("line", "line.dwo", eSectionTypeDWARFDebugLine) -      .Cases("line_str", "line_str.dwo", eSectionTypeDWARFDebugLineStr) +      .Cases({"line", "line.dwo"}, eSectionTypeDWARFDebugLine) +      .Cases({"line_str", "line_str.dwo"}, eSectionTypeDWARFDebugLineStr)        .Case("loc", eSectionTypeDWARFDebugLoc)        .Case("loc.dwo", eSectionTypeDWARFDebugLocDwo)        .Case("loclists", eSectionTypeDWARFDebugLocLists)        .Case("loclists.dwo", eSectionTypeDWARFDebugLocListsDwo)        .Case("macinfo", eSectionTypeDWARFDebugMacInfo) -      .Cases("macro", "macro.dwo", eSectionTypeDWARFDebugMacro) +      .Cases({"macro", "macro.dwo"}, eSectionTypeDWARFDebugMacro)        .Case("names", eSectionTypeDWARFDebugNames)        .Case("pubnames", eSectionTypeDWARFDebugPubNames)        .Case("pubtypes", eSectionTypeDWARFDebugPubTypes) @@ -663,7 +663,7 @@ ObjectFile::GetDWARFSectionTypeFromName(llvm::StringRef name) {        .Case("rnglists.dwo", eSectionTypeDWARFDebugRngListsDwo)        .Case("str", eSectionTypeDWARFDebugStr)        .Case("str.dwo", eSectionTypeDWARFDebugStrDwo) -      .Cases("str_offsets", "str_offs", eSectionTypeDWARFDebugStrOffsets) +      .Cases({"str_offsets", "str_offs"}, eSectionTypeDWARFDebugStrOffsets)        .Case("str_offsets.dwo", eSectionTypeDWARFDebugStrOffsetsDwo)        .Case("tu_index", eSectionTypeDWARFDebugTuIndex)        .Case("types", eSectionTypeDWARFDebugTypes) diff --git a/lldb/source/Symbol/Type.cpp b/lldb/source/Symbol/Type.cpp index 952b2bd..0c3246d 100644 --- a/lldb/source/Symbol/Type.cpp +++ b/lldb/source/Symbol/Type.cpp @@ -531,9 +531,9 @@ lldb::TypeSP Type::GetTypedefType() {  lldb::Format Type::GetFormat() { return GetForwardCompilerType().GetFormat(); } -lldb::Encoding Type::GetEncoding(uint64_t &count) { +lldb::Encoding Type::GetEncoding() {    // Make sure we resolve our type if it already hasn't been. -  return GetForwardCompilerType().GetEncoding(count); +  return GetForwardCompilerType().GetEncoding();  }  bool Type::ReadFromMemory(ExecutionContext *exe_ctx, lldb::addr_t addr,  | 
