diff options
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 4f72a750ea..9aca4e25ac 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -71,9 +71,9 @@ void AsmPrinter::SwitchSection(const char *NewSection, const GlobalValue *GV) { if (MLSections) { if (*NewSection == 0) { // Simply end the current section, if any. - if (CurrentSection != "") { - O << CurrentSection << "\tends\n"; - CurrentSection = ""; + if (!CurrentSection.empty()) { + O << CurrentSection << "\tends\n\n"; + CurrentSection.clear(); } return; } @@ -88,8 +88,8 @@ void AsmPrinter::SwitchSection(const char *NewSection, const GlobalValue *GV) { NS = "_text"; if (CurrentSection != NS) { - if (CurrentSection != "") - O << CurrentSection << "\tends\n"; + if (!CurrentSection.empty()) + O << CurrentSection << "\tends\n\n"; CurrentSection = NS; O << CurrentSection << (isData ? "\tsegment 'DATA'\n" : "\tsegment 'CODE'\n"); |