Changes in directory llvm/lib/Target/PowerPC:
PPCAsmPrinter.cpp updated: 1.108 -> 1.109 --- Log message: Make sure to use SwitchSection to switch sections so that we don't accidentally emit functions into the .const section. Whoops. --- Diffs of the changes: (+3 -2) PPCAsmPrinter.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.108 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.109 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.108 Mon Nov 14 13:00:30 2005 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Mon Nov 14 19:45:01 2005 @@ -437,7 +437,7 @@ if (CP.empty()) return; for (unsigned i = 0, e = CP.size(); i != e; ++i) { - O << "\t.const\n"; + SwitchSection(".const", 0); // FIXME: force doubles to be naturally aligned. We should handle this // more correctly in the future. if (Type::DoubleTy == CP[i]->getType()) @@ -487,6 +487,7 @@ } else { switch (I->getLinkage()) { case GlobalValue::LinkOnceLinkage: + SwitchSection("", 0); O << ".section __TEXT,__textcoal_nt,coalesced,no_toc\n" << ".weak_definition " << name << '\n' << ".private_extern " << name << '\n' @@ -649,7 +650,7 @@ if (CP.empty()) return; for (unsigned i = 0, e = CP.size(); i != e; ++i) { - O << "\t.const\n"; + SwitchSection(".const", 0); O << "\t.align " << (unsigned)TD.getTypeAlignment(CP[i]->getType()) << "\n"; O << "LCPI" << FunctionNumber << '_' << i << ":\t\t\t\t\t;" _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits