aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index 5b44c9ca5d..242a4fbbd0 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter.cpp
@@ -70,19 +70,10 @@ void AsmPrinter::SwitchToTextSection(const char *NewSection,
// sections.
if (MLSections) {
- if (*NewSection == 0) {
- // Simply end the current section, if any.
- if (!CurrentSection.empty()) {
- O << CurrentSection << "\tends\n\n";
- CurrentSection.clear();
- }
- return;
- }
-
if (GV && GV->hasSection())
NS = GV->getSection();
else
- NS = "_text";
+ NS = NewSection;
if (CurrentSection != NS) {
if (!CurrentSection.empty())
@@ -115,19 +106,10 @@ void AsmPrinter::SwitchToDataSection(const char *NewSection,
// sections.
if (MLSections) {
- if (*NewSection == 0) {
- // Simply end the current section, if any.
- if (!CurrentSection.empty()) {
- O << CurrentSection << "\tends\n\n";
- CurrentSection.clear();
- }
- return;
- }
-
if (GV && GV->hasSection())
NS = GV->getSection();
else
- NS = "_data";
+ NS = NewSection;
if (CurrentSection != NS) {
if (!CurrentSection.empty())