summaryrefslogtreecommitdiffstats
path: root/lib/MC
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-10-02 14:09:29 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-10-02 14:09:29 +0000
commit86b4f1a96fc1bc8890398d20b0153b7d434b835c (patch)
tree3c6cbfd14c18bc7679e7ff8a4de7e1e0381370bb /lib/MC
parent2be8ab460378455f82d719a872420fb5053f1bd5 (diff)
downloadexternal_llvm-86b4f1a96fc1bc8890398d20b0153b7d434b835c.zip
external_llvm-86b4f1a96fc1bc8890398d20b0153b7d434b835c.tar.gz
external_llvm-86b4f1a96fc1bc8890398d20b0153b7d434b835c.tar.bz2
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
Diffstat (limited to 'lib/MC')
-rw-r--r--lib/MC/MCParser/DarwinAsmParser.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/MC/MCParser/DarwinAsmParser.cpp b/lib/MC/MCParser/DarwinAsmParser.cpp
index f08270c..4c9bafa 100644
--- a/lib/MC/MCParser/DarwinAsmParser.cpp
+++ b/lib/MC/MCParser/DarwinAsmParser.cpp
@@ -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");
}