mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-24 08:33:39 +00:00
just remove the use_empty() check entirely, the only reason it
existed was for llvm-gcc 3.4 (which used the __main hack) which is really really long dead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66417 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5c3e7b1718
commit
ea3a9ff53d
@ -419,23 +419,17 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) {
|
||||
const TargetData *TD = TM.getTargetData();
|
||||
unsigned Align = Log2_32(TD->getPointerPrefAlignment());
|
||||
if (GV->getName() == "llvm.global_ctors") {
|
||||
GV->removeDeadConstantUsers();
|
||||
if (GV->use_empty()) {
|
||||
SwitchToDataSection(TAI->getStaticCtorsSection());
|
||||
EmitAlignment(Align, 0);
|
||||
EmitXXStructorList(GV->getInitializer());
|
||||
return true;
|
||||
}
|
||||
SwitchToDataSection(TAI->getStaticCtorsSection());
|
||||
EmitAlignment(Align, 0);
|
||||
EmitXXStructorList(GV->getInitializer());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (GV->getName() == "llvm.global_dtors") {
|
||||
GV->removeDeadConstantUsers();
|
||||
if (GV->use_empty()) {
|
||||
SwitchToDataSection(TAI->getStaticDtorsSection());
|
||||
EmitAlignment(Align, 0);
|
||||
EmitXXStructorList(GV->getInitializer());
|
||||
return true;
|
||||
}
|
||||
SwitchToDataSection(TAI->getStaticDtorsSection());
|
||||
EmitAlignment(Align, 0);
|
||||
EmitXXStructorList(GV->getInitializer());
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user