Skip to content

Commit 4543ee0

Browse files
authored
Merge branch 'main' into clang-doc-fix-basic-project-test
2 parents 3ec4d5b + 9a10132 commit 4543ee0

File tree

1,100 files changed

+32652
-21519
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,100 files changed

+32652
-21519
lines changed

.github/workflows/release-binaries.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,17 +156,34 @@ jobs:
156156
sparse-checkout: |
157157
.github/workflows/
158158
sparse-checkout-cone-mode: false
159+
# Check out outside of working directory so the source checkout doesn't
160+
# remove it.
159161
path: workflows
160162

161-
- name: Setup Stage
162-
id: setup-stage
163-
uses: ./workflows/.github/workflows/release-binaries-setup-stage
163+
# actions/checkout does not support paths outside of the GITHUB_WORKSPACE.
164+
# Also, anything that we put inside of GITHUB_WORKSPACE will be overwritten
165+
# by future actions/checkout steps. Therefore, in order to checkout the
166+
# latest actions from main, we need to first checkout out the actions inside of
167+
# GITHUB_WORKSPACE (see previous step), then use actions/checkout to checkout
168+
# the code being built and the move the actions from main back into GITHUB_WORKSPACE,
169+
# becasue the uses on composite actions only reads workflows from inside GITHUB_WORKSPACE.
170+
- shell: bash
171+
run: mv workflows ../workflows-main
164172

165173
- name: Checkout LLVM
166174
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
167175
with:
168176
ref: ${{ needs.prepare.outputs.ref }}
169177

178+
- name: Copy main workflows
179+
shell: bash
180+
run: |
181+
mv ../workflows-main .
182+
183+
- name: Setup Stage
184+
id: setup-stage
185+
uses: ./workflows-main/.github/workflows/release-binaries-setup-stage
186+
170187
- name: Setup sccache
171188
uses: hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e # v1.2.9
172189
with:
@@ -194,7 +211,7 @@ jobs:
194211
ls -ltr ${{ steps.setup-stage.outputs.build-prefix }}/build
195212
196213
- name: Save Stage
197-
uses: ./workflows/.github/workflows/release-binaries-save-stage
214+
uses: ./workflows-main/.github/workflows/release-binaries-save-stage
198215
with:
199216
build-prefix: ${{ steps.setup-stage.outputs.build-prefix }}
200217

bolt/include/bolt/Core/GDBIndex.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ class GDBIndex {
5353
const GDBIndexTUEntryType &getGDBIndexTUEntryVector() const {
5454
return GDBIndexTUEntryVector;
5555
}
56+
57+
/// Sorts entries in GDBIndexTUEntryVector according to the TypeHash.
58+
void sortGDBIndexTUEntryVector() {
59+
llvm::stable_sort(GDBIndexTUEntryVector, [](const GDBIndexTUEntry &LHS,
60+
const GDBIndexTUEntry &RHS) {
61+
return LHS.TypeHash > RHS.TypeHash;
62+
});
63+
}
5664
};
5765

5866
} // namespace bolt

bolt/include/bolt/Rewrite/DWARFRewriter.h

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "bolt/Core/GDBIndex.h"
1616
#include "llvm/ADT/StringRef.h"
1717
#include "llvm/CodeGen/DIE.h"
18-
#include "llvm/DWP/DWP.h"
1918
#include "llvm/MC/MCContext.h"
2019
#include "llvm/Support/ToolOutputFile.h"
2120
#include <cstdint>
@@ -41,13 +40,6 @@ class DWARFRewriter {
4140
uint64_t TypeHash;
4241
uint64_t TypeDIERelativeOffset;
4342
};
44-
/// Contains information for CU or TU so we can output correct {cu, tu}-index.
45-
struct UnitMeta {
46-
uint64_t Offset;
47-
uint64_t Length;
48-
uint64_t TUHash;
49-
};
50-
using UnitMetaVectorType = std::vector<UnitMeta>;
5143

5244
private:
5345
BinaryContext &BC;
@@ -194,35 +186,6 @@ class DWARFRewriter {
194186
const std::string &, DebugLocWriter &,
195187
DebugStrOffsetsWriter &, DebugStrWriter &);
196188
using KnownSectionsEntry = std::pair<MCSection *, DWARFSectionKind>;
197-
struct DWPState {
198-
std::unique_ptr<ToolOutputFile> Out;
199-
std::unique_ptr<BinaryContext> TmpBC;
200-
std::unique_ptr<MCStreamer> Streamer;
201-
std::unique_ptr<DWPStringPool> Strings;
202-
/// Used to store String sections for .dwo files if they are being modified.
203-
std::vector<std::unique_ptr<DebugBufferVector>> StrSections;
204-
const MCObjectFileInfo *MCOFI = nullptr;
205-
const DWARFUnitIndex *CUIndex = nullptr;
206-
std::deque<SmallString<32>> UncompressedSections;
207-
MapVector<uint64_t, UnitIndexEntry> IndexEntries;
208-
MapVector<uint64_t, UnitIndexEntry> TypeIndexEntries;
209-
StringMap<KnownSectionsEntry> KnownSections;
210-
uint32_t ContributionOffsets[8] = {};
211-
uint32_t IndexVersion = 2;
212-
uint64_t DebugInfoSize = 0;
213-
uint16_t Version = 0;
214-
bool IsDWP = false;
215-
};
216-
/// Init .dwp file
217-
void initDWPState(DWPState &);
218-
219-
/// Write out .dwp File
220-
void finalizeDWP(DWPState &);
221-
222-
/// add content of dwo to .dwp file.
223-
void updateDWP(DWARFUnit &, const OverriddenSectionsMap &, const UnitMeta &,
224-
UnitMetaVectorType &, DWPState &, DebugLocWriter &,
225-
DebugStrOffsetsWriter &, DebugStrWriter &);
226189
};
227190

228191
} // namespace bolt

bolt/lib/Core/GDBIndex.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ void GDBIndex::updateGdbIndexSection(
2323
DebugARangesSectionWriter &ARangesSectionWriter) {
2424
if (!BC.getGdbIndexSection())
2525
return;
26-
2726
// See https://sourceware.org/gdb/onlinedocs/gdb/Index-Section-Format.html
2827
// for .gdb_index section format.
2928

@@ -141,7 +140,7 @@ void GDBIndex::updateGdbIndexSection(
141140
write64le(Buffer + 8, CUInfo.second.Length + 4);
142141
Buffer += 16;
143142
}
144-
143+
sortGDBIndexTUEntryVector();
145144
// Rewrite TU CU List, since abbrevs can be different.
146145
// Entry example:
147146
// 0: offset = 0x00000000, type_offset = 0x0000001e, type_signature =

bolt/lib/Rewrite/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
set(LLVM_LINK_COMPONENTS
22
Core
33
DebugInfoDWARF
4-
DWP
54
JITLink
65
MC
76
Object

0 commit comments

Comments
 (0)