mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
implement a new magic global "llvm.compiler.used" which is like llvm.used, but
doesn't cause ".no_dead_strip" to be emitted on darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76399 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -466,13 +466,13 @@ void AsmPrinter::printPICJumpTableEntry(const MachineJumpTableInfo *MJTI,
|
||||
/// special global used by LLVM. If so, emit it and return true, otherwise
|
||||
/// do nothing and return false.
|
||||
bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) {
|
||||
if (GV->getName() == "llvm.used") {
|
||||
if (GV->isName("llvm.used")) {
|
||||
if (TAI->getUsedDirective() != 0) // No need to emit this at all.
|
||||
EmitLLVMUsedList(GV->getInitializer());
|
||||
return true;
|
||||
}
|
||||
|
||||
// Ignore debug and non-emitted data.
|
||||
// Ignore debug and non-emitted data. This handles llvm.compiler.used.
|
||||
if (GV->getSection() == "llvm.metadata" ||
|
||||
GV->hasAvailableExternallyLinkage())
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user