diff options
author | Hans Wennborg <hans@hanshq.net> | 2013-10-16 01:20:40 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2013-10-16 01:20:40 +0000 |
commit | d34cf143391c33d799ccd4735d3fe7630cdaa44b (patch) | |
tree | dab1ad6daeb50f9cec7f8a64c16e1d81f570200a /llvm/lib/MC/MCParser/COFFAsmParser.cpp | |
parent | 5645bade1bcde40a768b7daa43d8e0878243aae1 (diff) | |
download | bcm5719-llvm-d34cf143391c33d799ccd4735d3fe7630cdaa44b.tar.gz bcm5719-llvm-d34cf143391c33d799ccd4735d3fe7630cdaa44b.zip |
MC: Better handling of tricky symbol and section names
Because of win32 mangling, we produce symbol and section names with
funny characters in them, most notably @ characters.
MC would choke on trying to parse its own assembly output. This patch addresses
that by:
- Making @ trigger quoting of symbol names
- Also quote section names in the same way
- Just parse section names like other identifiers (to allow for quotes)
- Don't assume @ signifies a symbol variant if it is in a string.
Differential Revision: http://llvm-reviews.chandlerc.com/D1945
llvm-svn: 192758
Diffstat (limited to 'llvm/lib/MC/MCParser/COFFAsmParser.cpp')
-rw-r--r-- | llvm/lib/MC/MCParser/COFFAsmParser.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/MC/MCParser/COFFAsmParser.cpp b/llvm/lib/MC/MCParser/COFFAsmParser.cpp index df1794c9799..b3c094366ab 100644 --- a/llvm/lib/MC/MCParser/COFFAsmParser.cpp +++ b/llvm/lib/MC/MCParser/COFFAsmParser.cpp @@ -295,12 +295,7 @@ bool COFFAsmParser::ParseSectionSwitch(StringRef Section, } bool COFFAsmParser::ParseSectionName(StringRef &SectionName) { - if (!getLexer().is(AsmToken::Identifier)) - return true; - - SectionName = getTok().getIdentifier(); - Lex(); - return false; + return getParser().parseIdentifier(SectionName); } // .section name [, "flags"] |