[llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp
Reid Spencer
rspencer at reidspencer.com
Mon Oct 30 17:44:59 PST 2006
Evan,
Please don't check things in that don't compile:
X86AsmPrinter.cpp: In member function `virtual bool
llvm::X86SharedAsmPrinter::doFinalization(llvm::Module&)':
X86AsmPrinter.cpp:232: error: no matching function for call to
`llvm::X86SharedAsmPrinter::SwitchToDataSection(const char*)'
/proj/llvm/llvm/include/llvm/CodeGen/AsmPrinter.h:96: note: candidates
are: void llvm::AsmPrinter::SwitchToDataSection(const char*, const
llvm::GlobalValue*)
Reid.
On Mon, 2006-10-30 at 19:27 -0600, Evan Cheng wrote:
>
> Changes in directory llvm/lib/Target/X86:
>
> X86AsmPrinter.cpp updated: 1.208 -> 1.209
> ---
> Log message:
>
> Apply Aton's LLVM patch for PR973: http://llvm.org/PR973 : Linux ctors / dtors support.
>
> ---
> Diffs of the changes: (+22 -4)
>
> X86AsmPrinter.cpp | 26 ++++++++++++++++++++++----
> 1 files changed, 22 insertions(+), 4 deletions(-)
>
>
> Index: llvm/lib/Target/X86/X86AsmPrinter.cpp
> diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.208 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.209
> --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.208 Mon Oct 30 16:32:30 2006
> +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Mon Oct 30 19:26:55 2006
> @@ -145,10 +145,11 @@
> unsigned Align = TD->getPreferredAlignmentLog(I);
>
> if (C->isNullValue() && /* FIXME: Verify correct */
> + !I->hasSection() &&
> (I->hasInternalLinkage() || I->hasWeakLinkage() ||
> I->hasLinkOnceLinkage() ||
> (Subtarget->isTargetDarwin() &&
> - I->hasExternalLinkage() && !I->hasSection()))) {
> + I->hasExternalLinkage()))) {
> if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
> if (I->hasExternalLinkage()) {
> O << "\t.globl\t" << name << "\n";
> @@ -185,14 +186,14 @@
> } else if (Subtarget->isTargetCygwin()) {
> std::string SectionName(".section\t.data$linkonce." +
> name +
> - ",\"aw\"\n");
> + ",\"aw\"");
> SwitchToDataSection(SectionName.c_str(), I);
> O << "\t.globl " << name << "\n"
> << "\t.linkonce same_size\n";
> } else {
> std::string SectionName("\t.section\t.llvm.linkonce.d." +
> name +
> - ",\"aw\", at progbits\n");
> + ",\"aw\", at progbits");
> SwitchToDataSection(SectionName.c_str(), I);
> O << "\t.weak " << name << "\n";
> }
> @@ -215,7 +216,24 @@
> break;
> }
> }
> - SwitchToDataSection(TAI->getDataSection(), I);
> + // FIXME: special handling for ".ctors" & ".dtors" sections
> + if (I->hasSection() &&
> + (I->getSection() == ".ctors" ||
> + I->getSection() == ".dtors")) {
> + std::string SectionName = ".section " + I->getSection();
> +
> + if (Subtarget->isTargetCygwin()) {
> + SectionName += ",\"aw\"";
> + } else {
> + assert(!Subtarget->isTargetDarwin());
> + SectionName += ",\"aw\", at progbits";
> + }
> +
> + SwitchToDataSection(SectionName.c_str());
> + } else {
> + SwitchToDataSection(TAI->getDataSection(), I);
> + }
> +
> break;
> }
> default:
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list