forked from OSchip/llvm-project
[MCParser] Support quoted section name for COFF
This features matches ELFAsmParser and makes it possible to use `.section ".llvm.call-graph-profile","n"` Reviewed By: zequanwu Differential Revision: https://reviews.llvm.org/D82240
This commit is contained in:
parent
9c56e94a9f
commit
c52bee61e9
|
@ -321,7 +321,7 @@ bool COFFAsmParser::ParseSectionSwitch(StringRef Section,
|
|||
}
|
||||
|
||||
bool COFFAsmParser::ParseSectionName(StringRef &SectionName) {
|
||||
if (!getLexer().is(AsmToken::Identifier))
|
||||
if (!getLexer().is(AsmToken::Identifier) && !getLexer().is(AsmToken::String))
|
||||
return true;
|
||||
|
||||
SectionName = getTok().getIdentifier();
|
||||
|
|
|
@ -190,5 +190,11 @@
|
|||
// CHECK-NEXT: ]
|
||||
// CHECK: }
|
||||
|
||||
/// The section name can be quoted.
|
||||
.section "@#$-{","n"
|
||||
// CHECK: Section {
|
||||
// CHECK-NEXT: Number:
|
||||
// CHECK-NEXT: Name: @#$-{
|
||||
|
||||
// CHECK-NOT: Section {
|
||||
// CHECK: ]
|
||||
|
|
Loading…
Reference in New Issue