Skip to content

Commit d97749f

Browse files
committed
[ELF] Switch split-stack to use SmallVector. NFC
My x86-64 lld executable is 1.1KiB smaller.
1 parent 95bf0a9 commit d97749f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lld/ELF/InputSection.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,8 @@ void InputSectionBase::relocateAlloc(uint8_t *buf, uint8_t *bufEnd) {
11261126
// For each function-defining prologue, find any calls to __morestack,
11271127
// and replace them with calls to __morestack_non_split.
11281128
static void switchMorestackCallsToMorestackNonSplit(
1129-
DenseSet<Defined *> &prologues, std::vector<Relocation *> &morestackCalls) {
1129+
DenseSet<Defined *> &prologues,
1130+
SmallVector<Relocation *, 0> &morestackCalls) {
11301131

11311132
// If the target adjusted a function's prologue, all calls to
11321133
// __morestack inside that function should be switched to
@@ -1176,7 +1177,7 @@ template <class ELFT>
11761177
void InputSectionBase::adjustSplitStackFunctionPrologues(uint8_t *buf,
11771178
uint8_t *end) {
11781179
DenseSet<Defined *> prologues;
1179-
std::vector<Relocation *> morestackCalls;
1180+
SmallVector<Relocation *, 0> morestackCalls;
11801181

11811182
for (Relocation &rel : relocations) {
11821183
// Ignore calls into the split-stack api.

0 commit comments

Comments
 (0)