[llvm-commits] [llvm] r66417 - /llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Mon Mar 9 01:18:49 PDT 2009
Author: lattner
Date: Mon Mar 9 03:18:48 2009
New Revision: 66417
URL: http://llvm.org/viewvc/llvm-project?rev=66417&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=66417&r1=66416&r2=66417&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Mar 9 03:18:48 2009
@@ -419,23 +419,17 @@
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;
More information about the llvm-commits
mailing list