[PATCH] D15678: [ELF][gcc compatibility]: support section names with "/"

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 08:24:47 PST 2016


majnemer added inline comments.

================
Comment at: lib/MC/MCParser/ELFAsmParser.cpp:235-249
@@ -234,14 +234,17 @@
     SMLoc PrevLoc = getLexer().getLoc();
     if (getLexer().is(AsmToken::Minus)) {
       CurSize = 1;
       Lex(); // Consume the "-".
+    } else if (getLexer().is(AsmToken::Slash)) {
+      CurSize = 1;
+      Lex(); // Consume the "/".
     } else if (getLexer().is(AsmToken::String)) {
       CurSize = getTok().getIdentifier().size() + 2;
       Lex();
     } else if (getLexer().is(AsmToken::Identifier)) {
       CurSize = getTok().getIdentifier().size();
       Lex();
     } else {
       break;
     }
 
----------------
GNU as's behavior seems to be the following: the section name is either exactly one quoted string OR it is anything other than a newline,tab,comma or semicolon.


Repository:
  rL LLVM

http://reviews.llvm.org/D15678





More information about the llvm-commits mailing list