diff options
author | Jeff Cohen <jeffc@jolt-lang.org> | 2006-05-06 21:27:14 +0000 |
---|---|---|
committer | Jeff Cohen <jeffc@jolt-lang.org> | 2006-05-06 21:27:14 +0000 |
commit | d43b18d9e47326cb83b11d684d569ee9050ebefa (patch) | |
tree | 9ab7984a986c6365ccb2d9418f25145dadd3a3e8 /lib/CodeGen | |
parent | a0aec0a61dbc47d15190cb229dba3f82496756aa (diff) | |
download | llvm-d43b18d9e47326cb83b11d684d569ee9050ebefa.tar.gz llvm-d43b18d9e47326cb83b11d684d569ee9050ebefa.tar.bz2 llvm-d43b18d9e47326cb83b11d684d569ee9050ebefa.tar.xz |
Fix some loose ends in MASM support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28148 91177308-0d34-0410-b5e6-96231b3b80d8
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"); |