aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-09 05:15:58 +0000
committerChris Lattner <sabre@nondot.org>2006-05-09 05:15:58 +0000
commit13f161c51844d02af9b3637330af95f79db2f1c1 (patch)
tree789f0c7cf1e53ed6d4795829008502f65d2b939a /lib/CodeGen/AsmPrinter.cpp
parente7027d53395452076314ebc5289543048fcbd022 (diff)
Make the masm codepath work like the normal code path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28188 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index 242a4fbbd0..28ff772d1c 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter.cpp
@@ -79,7 +79,8 @@ void AsmPrinter::SwitchToTextSection(const char *NewSection,
if (!CurrentSection.empty())
O << CurrentSection << "\tends\n\n";
CurrentSection = NS;
- O << CurrentSection << "\tsegment 'CODE'\n";
+ if (!CurrentSection.empty())
+ O << CurrentSection << "\tsegment 'CODE'\n";
}
} else {
if (GV && GV->hasSection())
@@ -115,7 +116,8 @@ void AsmPrinter::SwitchToDataSection(const char *NewSection,
if (!CurrentSection.empty())
O << CurrentSection << "\tends\n\n";
CurrentSection = NS;
- O << CurrentSection << "\tsegment 'DATA'\n";
+ if (!CurrentSection.empty())
+ O << CurrentSection << "\tsegment 'DATA'\n";
}
} else {
if (GV && GV->hasSection())