Add Support For .bss Named Section Directive For Darwin Targets.

Patch by Nicholas White.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191824 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2013-10-02 14:09:29 +00:00
parent 2be8ab4603
commit 86b4f1a96f

View File

@ -71,6 +71,7 @@ public:
".end_data_region");
// Special section directives.
addDirectiveHandler<&DarwinAsmParser::ParseSectionDirectiveBss>(".bss");
addDirectiveHandler<&DarwinAsmParser::ParseSectionDirectiveConst>(".const");
addDirectiveHandler<&DarwinAsmParser::ParseSectionDirectiveConstData>(
".const_data");
@ -182,6 +183,10 @@ public:
bool ParseDirectiveDataRegionEnd(StringRef, SMLoc);
// Named Section Directive
bool ParseSectionDirectiveBss(StringRef, SMLoc) {
return ParseSectionSwitch("__DATA", "__bss");
}
bool ParseSectionDirectiveConst(StringRef, SMLoc) {
return ParseSectionSwitch("__TEXT", "__const");
}