diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -1920,7 +1920,7 @@ // Next, check the extension directive map to see if any extension has // registered itself to parse this directive. std::pair Handler = - ExtensionDirectiveMap.lookup(IDVal); + ExtensionDirectiveMap.lookup(IDVal.lower()); if (Handler.first) return (*Handler.second)(Handler.first, IDVal, IDLoc); diff --git a/llvm/test/MC/ELF/elf_directive_section.s b/llvm/test/MC/ELF/elf_directive_section.s --- a/llvm/test/MC/ELF/elf_directive_section.s +++ b/llvm/test/MC/ELF/elf_directive_section.s @@ -21,3 +21,24 @@ .tdata # CHECK: .tdata + .BSS +# CHECK: .bss + + .DATA.REL.RO +# CHECK: .data.rel.ro + + .DATA.REL +# CHECK: .data.rel + + .EH_FRAME +# CHECK: .eh_frame + + .RODATA +# CHECK: .rodata + + .TBSS +# CHECK: .tbss + + .TDATA +# CHECK: .tdata +