mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-08 12:21:04 +00:00
If using __main, emit global ctor/dtor list like any other global
llvm-svn: 25251
This commit is contained in:
parent
ac8df987d5
commit
c9d03f7b02
@ -120,14 +120,14 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) {
|
||||
if (GV->getName() == "llvm.used")
|
||||
return true; // No need to emit this at all.
|
||||
|
||||
if (GV->getName() == "llvm.global_ctors") {
|
||||
if (GV->getName() == "llvm.global_ctors" && GV->use_empty()) {
|
||||
SwitchSection(StaticCtorsSection, 0);
|
||||
EmitAlignment(2, 0);
|
||||
EmitXXStructorList(GV->getInitializer());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (GV->getName() == "llvm.global_dtors") {
|
||||
if (GV->getName() == "llvm.global_dtors" && GV->use_empty()) {
|
||||
SwitchSection(StaticDtorsSection, 0);
|
||||
EmitAlignment(2, 0);
|
||||
EmitXXStructorList(GV->getInitializer());
|
||||
|
Loading…
Reference in New Issue
Block a user