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 | ce9b9fe6ebe435d02c4a399dea46d97104213abd (patch) | |
tree | cc01f3207b4fc78b632616c23ebb6e16050852e1 /llvm/lib/CodeGen | |
parent | 0b8c57ec2b4b892b412b3ac7b07eae20e5b8477f (diff) | |
download | bcm5719-llvm-ce9b9fe6ebe435d02c4a399dea46d97104213abd.tar.gz bcm5719-llvm-ce9b9fe6ebe435d02c4a399dea46d97104213abd.zip |
Fix some loose ends in MASM support.
llvm-svn: 28148
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp index 4f72a750ea1..9aca4e25ac0 100644 --- a/llvm/lib/CodeGen/AsmPrinter.cpp +++ b/llvm/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"); |