Avoid emitting two tabs when switching to a named section

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24646 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-12-09 19:28:49 +00:00
parent 646f7afb79
commit 42a80fedad

View File

@ -30,12 +30,12 @@ void AsmPrinter::SwitchSection(const char *NewSection, const GlobalValue *GV) {
if (GV && GV->hasSection()) if (GV && GV->hasSection())
NS = SwitchToSectionDirective + GV->getSection(); NS = SwitchToSectionDirective + GV->getSection();
else else
NS = NewSection; NS = std::string("\t")+NewSection;
if (CurrentSection != NS) { if (CurrentSection != NS) {
CurrentSection = NS; CurrentSection = NS;
if (!CurrentSection.empty()) if (!CurrentSection.empty())
O << "\t" << CurrentSection << "\n"; O << CurrentSection << '\n';
} }
} }