Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 010f535

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:6eee238975e4 into amd-gfx:4d4ec95d174b
Local branch amd-gfx 4d4ec95 Merged main:cf670d5e56d1 into amd-gfx:917468d90022 Remote branch main 6eee238 [unittest] Add option to allow disabling sharding in unittest (llvm#67063)
2 parents 4d4ec95 + 6eee238 commit 010f535

File tree

20 files changed

+417
-102
lines changed

20 files changed

+417
-102
lines changed

lld/ELF/InputSection.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,10 +435,7 @@ void InputSection::copyRelocations(uint8_t *buf,
435435
continue;
436436
}
437437
SectionBase *section = d->section;
438-
if (!section->isLive()) {
439-
p->setSymbolAndType(0, 0, false);
440-
continue;
441-
}
438+
assert(section->isLive());
442439

443440
int64_t addend = rel.addend;
444441
const uint8_t *bufLoc = sec->content().begin() + rel.offset;

lldb/include/lldb/Symbol/CompilerType.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ class CompilerType {
4242
///
4343
/// \see lldb_private::TypeSystemClang::GetType(clang::QualType)
4444
CompilerType(lldb::TypeSystemWP type_system,
45-
lldb::opaque_compiler_type_t type)
46-
: m_type_system(type_system), m_type(type) {
47-
assert(Verify() && "verification failed");
48-
}
45+
lldb::opaque_compiler_type_t type);
4946

5047
/// This is a minimal wrapper of a TypeSystem shared pointer as
5148
/// returned by CompilerType which conventien dyn_cast support.
@@ -88,10 +85,8 @@ class CompilerType {
8885
lldb::TypeSystemSP GetSharedPointer() const { return m_typesystem_sp; }
8986
};
9087

91-
CompilerType(TypeSystemSPWrapper type_system, lldb::opaque_compiler_type_t type)
92-
: m_type_system(type_system.GetSharedPointer()), m_type(type) {
93-
assert(Verify() && "verification failed");
94-
}
88+
CompilerType(TypeSystemSPWrapper type_system,
89+
lldb::opaque_compiler_type_t type);
9590

9691
CompilerType(const CompilerType &rhs)
9792
: m_type_system(rhs.m_type_system), m_type(rhs.m_type) {}

lldb/include/lldb/Utility/Scalar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class Scalar {
101101

102102
const char *GetTypeAsCString() const { return GetValueTypeAsCString(m_type); }
103103

104-
void GetValue(Stream *s, bool show_type) const;
104+
void GetValue(Stream &s, bool show_type) const;
105105

106106
bool IsValid() const { return (m_type >= e_int) && (m_type <= e_float); }
107107

lldb/source/Core/Value.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ void Value::AppendBytes(const void *bytes, int len) {
9898
}
9999

100100
void Value::Dump(Stream *strm) {
101-
m_value.GetValue(strm, true);
101+
if (!strm)
102+
return;
103+
m_value.GetValue(*strm, true);
102104
strm->Printf(", value_type = %s, context = %p, context_type = %s",
103105
Value::GetValueTypeAsCString(m_value_type), m_context,
104106
Value::GetContextTypeAsCString(m_context_type));

lldb/source/Interpreter/CommandInterpreter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1773,7 +1773,7 @@ CommandInterpreter::PreprocessToken(std::string &expr_str) {
17731773

17741774
StreamString value_strm;
17751775
const bool show_type = false;
1776-
scalar.GetValue(&value_strm, show_type);
1776+
scalar.GetValue(value_strm, show_type);
17771777
size_t value_string_size = value_strm.GetSize();
17781778
if (value_string_size) {
17791779
expr_str = value_strm.GetData();

lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class SymbolFileDWARFDebugMap;
6262
class SymbolFileDWARFDwo;
6363
class SymbolFileDWARFDwp;
6464

65-
#define DIE_IS_BEING_PARSED ((Type *)1)
65+
#define DIE_IS_BEING_PARSED ((lldb_private::Type *)1)
6666

6767
class SymbolFileDWARF : public SymbolFileCommon {
6868
/// LLVM RTTI support.

lldb/source/Symbol/CompilerType.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,18 @@ bool CompilerType::GetValueAsScalar(const lldb_private::DataExtractor &data,
951951
return false;
952952
}
953953

954+
CompilerType::CompilerType(CompilerType::TypeSystemSPWrapper type_system,
955+
lldb::opaque_compiler_type_t type)
956+
: m_type_system(type_system.GetSharedPointer()), m_type(type) {
957+
assert(Verify() && "verification failed");
958+
}
959+
960+
CompilerType::CompilerType(lldb::TypeSystemWP type_system,
961+
lldb::opaque_compiler_type_t type)
962+
: m_type_system(type_system), m_type(type) {
963+
assert(Verify() && "verification failed");
964+
}
965+
954966
#ifndef NDEBUG
955967
bool CompilerType::Verify() const {
956968
if (!IsValid())

lldb/source/Utility/Scalar.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,20 +153,20 @@ bool Scalar::IsZero() const {
153153
return false;
154154
}
155155

156-
void Scalar::GetValue(Stream *s, bool show_type) const {
156+
void Scalar::GetValue(Stream &s, bool show_type) const {
157157
if (show_type)
158-
s->Printf("(%s) ", GetTypeAsCString());
158+
s.Printf("(%s) ", GetTypeAsCString());
159159

160160
switch (m_type) {
161161
case e_void:
162162
break;
163163
case e_int:
164-
s->PutCString(llvm::toString(m_integer, 10));
164+
s.PutCString(llvm::toString(m_integer, 10));
165165
break;
166166
case e_float:
167167
llvm::SmallString<24> string;
168168
m_float.toString(string);
169-
s->PutCString(string);
169+
s.PutCString(string);
170170
break;
171171
}
172172
}
@@ -894,6 +894,6 @@ bool Scalar::SetBit(uint32_t bit) {
894894

895895
llvm::raw_ostream &lldb_private::operator<<(llvm::raw_ostream &os, const Scalar &scalar) {
896896
StreamString s;
897-
scalar.GetValue(&s, /*show_type*/ true);
897+
scalar.GetValue(s, /*show_type*/ true);
898898
return os << s.GetString();
899899
}

lldb/unittests/Utility/ScalarTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ TEST(ScalarTest, ExtractBitfield) {
241241

242242
template <typename T> static std::string ScalarGetValue(T value) {
243243
StreamString stream;
244-
Scalar(value).GetValue(&stream, false);
244+
Scalar(value).GetValue(stream, false);
245245
return std::string(stream.GetString());
246246
}
247247

llvm/include/llvm/Config/llvm-config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Indicate that this is LLVM compiled from the amd-gfx branch. */
1818
#define LLVM_HAVE_BRANCH_AMD_GFX
19-
#define LLVM_MAIN_REVISION 477818
19+
#define LLVM_MAIN_REVISION 477827
2020

2121
/* Define if LLVM_ENABLE_DUMP is enabled */
2222
#cmakedefine LLVM_ENABLE_DUMP

0 commit comments

Comments
 (0)