[llvm] r305973 - Revert "[Target] Implement the ".rdata" MIPS assembly directive."

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 21 17:11:41 PDT 2017


Author: davide
Date: Wed Jun 21 19:11:41 2017
New Revision: 305973

URL: http://llvm.org/viewvc/llvm-project?rev=305973&view=rev
Log:
Revert "[Target] Implement the ".rdata" MIPS assembly directive."

This reverts commit r305949 and r305950 as they didn't have the
correct commit message.

Removed:
    llvm/trunk/test/CodeGen/Mips/mips-rdata.s
Modified:
    llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp

Modified: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp?rev=305973&r1=305972&r2=305973&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Wed Jun 21 19:11:41 2017
@@ -322,7 +322,6 @@ class MipsAsmParser : public MCTargetAsm
   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(AsmTo
     parseInsnDirective();
     return false;
   }
-  if (IDVal == ".rdata") {
-    parseRSectionDirective(".rodata");
-    return false;
-  }
   if (IDVal == ".sbss") {
     parseSSectionDirective(IDVal, ELF::SHT_NOBITS);
     return false;

Removed: llvm/trunk/test/CodeGen/Mips/mips-rdata.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/mips-rdata.s?rev=305972&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/mips-rdata.s (original)
+++ llvm/trunk/test/CodeGen/Mips/mips-rdata.s (removed)
@@ -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: ]




More information about the llvm-commits mailing list