diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-07-09 13:28:19 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-07-09 13:28:19 +0000 |
commit | 03dc8bf4d61432ae700231fc47fc37ff1f9a92c0 (patch) | |
tree | bfe07f69b3b40b85da2a31fbe64bdf8abe359ea9 /llvm/lib/Target | |
parent | 577c45dd74c35bfcab81c45504e5c82b5704dbe3 (diff) | |
download | bcm5719-llvm-03dc8bf4d61432ae700231fc47fc37ff1f9a92c0.tar.gz bcm5719-llvm-03dc8bf4d61432ae700231fc47fc37ff1f9a92c0.zip |
Honour text sections
llvm-svn: 53319
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/X86/X86ATTAsmPrinter.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86TargetAsmInfo.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp b/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp index 0236e492888..61556baea1b 100644 --- a/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp +++ b/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp @@ -154,10 +154,11 @@ std::string X86ATTAsmPrinter::getSectionForFunction(const Function &F) const { void X86ATTAsmPrinter::emitFunctionHeader(const MachineFunction &MF) { const Function *F = MF.getFunction(); + std::string SectionName = TAI->SectionForGlobal(F); decorateName(CurrentFnName, F); - SwitchToTextSection(TAI->SectionForGlobal(F).c_str(), F); + SwitchToTextSection(SectionName.c_str()); unsigned FnAlign = OptimizeForSize ? 1 : 4; switch (F->getLinkage()) { diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp index dd1bdb884ad..43d60cbd8f4 100644 --- a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp @@ -433,7 +433,7 @@ X86ELFTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { return UniqueSectionForGlobal(F, kind); } } else if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV)) { - if (GVar->isWeakForLinker() + if (GVar->isWeakForLinker()) return UniqueSectionForGlobal(GVar, kind); else { switch (kind) { |