Skip to content

Commit

Permalink
Weak linkage
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSte committed Nov 11, 2024
1 parent db9e6f2 commit 22100ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lld/ELF/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2642,6 +2642,7 @@ static void optimizeSBF() {

out << "\n\nAfter codegen\n";
for (auto &Func: mods[0]->functions()) {
Func.setLinkage(GlobalValue::LinkageTypes::ExternalWeakLinkage);
out << Func.getName().str() << "\n";
}

Expand Down
1 change: 1 addition & 0 deletions llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@ void AsmPrinter::emitLinkage(const GlobalValue *GV, MCSymbol *GVSym) const {
case GlobalValue::InternalLinkage:
return;
case GlobalValue::ExternalWeakLinkage:
return;
case GlobalValue::AvailableExternallyLinkage:
case GlobalValue::AppendingLinkage:
llvm_unreachable("Should never emit this");
Expand Down

0 comments on commit 22100ea

Please sign in to comment.