]> granicus.if.org Git - llvm/commitdiff
Revert "[Target] Implement the ".rdata" MIPS assembly directive."
authorDavide Italiano <davide@freebsd.org>
Thu, 22 Jun 2017 00:11:41 +0000 (00:11 +0000)
committerDavide Italiano <davide@freebsd.org>
Thu, 22 Jun 2017 00:11:41 +0000 (00:11 +0000)
This reverts commit r305949 and r305950 as they didn't have the
correct commit message.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305973 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/AsmParser/MipsAsmParser.cpp
test/CodeGen/Mips/mips-rdata.s [deleted file]

index 426598d0df78f153d21715f031ab7bf40eefdadc..694c201cbe8dce54471f4b84cb0d34fc9f9080aa 100644 (file)
@@ -322,7 +322,6 @@ class MipsAsmParser : public MCTargetAsmParser {
   bool parseDirectiveSet();
   bool parseDirectiveOption();
   bool parseInsnDirective();
-  bool parseRSectionDirective(StringRef Section);
   bool parseSSectionDirective(StringRef Section, unsigned Type);
 
   bool parseSetAtDirective();
@@ -6953,23 +6952,6 @@ bool MipsAsmParser::parseInsnDirective() {
   return false;
 }
 
-/// parseRSectionDirective
-///  ::= .rdata
-bool MipsAsmParser::parseRSectionDirective(StringRef Section) {
-  // If this is not the end of the statement, report an error.
-  if (getLexer().isNot(AsmToken::EndOfStatement)) {
-    reportParseError("unexpected token, expected end of statement");
-    return false;
-  }
-
-  MCSection *ELFSection =
-      getContext().getELFSection(Section, ELF::SHT_PROGBITS, ELF::SHF_ALLOC);
-  getParser().getStreamer().SwitchSection(ELFSection);
-
-  getParser().Lex(); // Eat EndOfStatement token.
-  return false;
-}
-
 /// parseSSectionDirective
 ///  ::= .sbss
 ///  ::= .sdata
@@ -7517,10 +7499,6 @@ bool MipsAsmParser::ParseDirective(AsmToken DirectiveID) {
     parseInsnDirective();
     return false;
   }
-  if (IDVal == ".rdata") {
-    parseRSectionDirective(".rodata");
-    return false;
-  }
   if (IDVal == ".sbss") {
     parseSSectionDirective(IDVal, ELF::SHT_NOBITS);
     return false;
diff --git a/test/CodeGen/Mips/mips-rdata.s b/test/CodeGen/Mips/mips-rdata.s
deleted file mode 100644 (file)
index 89f9619..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# Check that .rdata sections have proper name, flags, and section types.
-
-# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o - \
-# RUN:   | llvm-readobj -s | FileCheck %s
-
-  .rdata
-  .word 0
-
-# CHECK:      Name: .rodata
-# CHECK-NEXT: Type: SHT_PROGBITS
-# CHECK-NEXT: Flags [ (0x2)
-# CHECK-NEXT:   SHF_ALLOC
-# CHECK-NEXT: ]