mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Fix some loose ends in MASM support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28148 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user