Skip to content

Commit

Permalink
Integrate LLVM at llvm/llvm-project@aa65f93b71de
Browse files Browse the repository at this point in the history
Updates LLVM usage to match
[aa65f93b71de](llvm/llvm-project@aa65f93b71de)

PiperOrigin-RevId: 720583306
  • Loading branch information
gribozavr authored and copybara-github committed Jan 28, 2025
1 parent 21dcb28 commit a088c56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 59 deletions.
57 changes: 0 additions & 57 deletions third_party/llvm/generated.patch
Original file line number Diff line number Diff line change
@@ -1,58 +1 @@
Auto generated patch. Do not edit or delete it, even if empty.
diff -ruN --strip-trailing-cr a/lld/ELF/Config.h b/lld/ELF/Config.h
--- a/lld/ELF/Config.h
+++ b/lld/ELF/Config.h
@@ -619,7 +619,6 @@
};
ElfSym sym{};
std::unique_ptr<SymbolTable> symtab;
- SmallVector<Symbol *, 0> synthesizedSymbols;

SmallVector<std::unique_ptr<MemoryBuffer>> memoryBuffers;
SmallVector<ELFFileBase *, 0> objectFiles;
diff -ruN --strip-trailing-cr a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -149,7 +149,6 @@
if (!s || s->isDefined() || s->isCommon())
return nullptr;

- ctx.synthesizedSymbols.push_back(s);
s->resolve(ctx, Defined{ctx, ctx.internalFile, StringRef(), STB_GLOBAL,
stOther, STT_NOTYPE, val,
/*size=*/0, sec});
@@ -283,7 +282,6 @@
static void demoteSymbolsAndComputeIsPreemptible(Ctx &ctx) {
llvm::TimeTraceScope timeScope("Demote symbols");
DenseMap<InputFile *, DenseMap<SectionBase *, size_t>> sectionIndexMap;
- bool hasDynSymTab = ctx.arg.hasDynSymTab;
for (Symbol *sym : ctx.symtab->getSymbols()) {
if (auto *d = dyn_cast<Defined>(sym)) {
if (d->section && !d->section->isLive())
@@ -296,12 +294,11 @@
sym->type)
.overwrite(*sym);
sym->versionId = VER_NDX_GLOBAL;
- if (sym->includeInDynsym(ctx))
- sym->isExported = true;
}
}

- if (hasDynSymTab)
+ sym->isExported = sym->includeInDynsym(ctx);
+ if (ctx.arg.hasDynSymTab)
sym->isPreemptible = sym->isExported && computeIsPreemptible(ctx, *sym);
}
}
@@ -1839,11 +1836,6 @@
}
}

- // If the previous code block defines any non-hidden symbols (e.g.
- // __global_pointer$), they may be exported.
- for (Symbol *sym : ctx.synthesizedSymbols)
- sym->isExported = sym->includeInDynsym(ctx);
-
demoteSymbolsAndComputeIsPreemptible(ctx);

if (ctx.arg.copyRelocs && ctx.arg.discard != DiscardPolicy::None)
4 changes: 2 additions & 2 deletions third_party/llvm/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ load("//third_party:repo.bzl", "tf_http_archive")

def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "2e5a5237daf82a657561c490845c406e13657311"
LLVM_SHA256 = "e0622b7f81a046e1576d8d07c5ba916346c2a1c06528655d3ddd45a1028eac89"
LLVM_COMMIT = "aa65f93b71dee8cacb22be1957673c8be6a3ec24"
LLVM_SHA256 = "0a6046edb6a9834d5b912ec0e705dec91d39ee1b7b2fbb5930955d83d2090ff5"

tf_http_archive(
name = name,
Expand Down

0 comments on commit a088c56

Please sign in to comment.