diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-05-09 05:15:58 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-05-09 05:15:58 +0000 |
| commit | e64f764d25831f9e1e136647d9d2c8fa958b6cf0 (patch) | |
| tree | 262ad602fc3deeef48ad39272ca72b66832b5bf9 /llvm/lib/CodeGen | |
| parent | e0006c67942151a341b3b23f6edb10b777360a16 (diff) | |
| download | bcm5719-llvm-e64f764d25831f9e1e136647d9d2c8fa958b6cf0.tar.gz bcm5719-llvm-e64f764d25831f9e1e136647d9d2c8fa958b6cf0.zip | |
Make the masm codepath work like the normal code path.
llvm-svn: 28188
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp index 242a4fbbd04..28ff772d1ce 100644 --- a/llvm/lib/CodeGen/AsmPrinter.cpp +++ b/llvm/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()) |

