summaryrefslogtreecommitdiff
path: root/lib/MC/MCParser/ELFAsmParser.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-02-26 22:03:50 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-02-26 22:03:50 +0000
commitd0e4e96dc17a6c1c6de3340842c80f0e187ba349 (patch)
treeddf53b8bd9235bcb0b8aae16c5e22310dcdad665 /lib/MC/MCParser/ELFAsmParser.cpp
parentcf099d11218cb6f6c5cce947d6738e347f07fb12 (diff)
Notes
Diffstat (limited to 'lib/MC/MCParser/ELFAsmParser.cpp')
-rw-r--r--lib/MC/MCParser/ELFAsmParser.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/MC/MCParser/ELFAsmParser.cpp b/lib/MC/MCParser/ELFAsmParser.cpp
index bfaf36a451b3..dcf689a6f0e7 100644
--- a/lib/MC/MCParser/ELFAsmParser.cpp
+++ b/lib/MC/MCParser/ELFAsmParser.cpp
@@ -30,9 +30,12 @@ class ELFAsmParser : public MCAsmParserExtension {
bool ParseSectionSwitch(StringRef Section, unsigned Type,
unsigned Flags, SectionKind Kind);
+ bool SeenIdent;
public:
- ELFAsmParser() {}
+ ELFAsmParser() : SeenIdent(false) {
+ BracketExpressionsSupported = true;
+ }
virtual void Initialize(MCAsmParser &Parser) {
// Call the base implementation.
@@ -456,13 +459,12 @@ bool ELFAsmParser::ParseDirectiveIdent(StringRef, SMLoc) {
SectionKind::getReadOnly(),
1, "");
- static bool First = true;
-
getStreamer().PushSection();
getStreamer().SwitchSection(Comment);
- if (First)
+ if (!SeenIdent) {
getStreamer().EmitIntValue(0, 1);
- First = false;
+ SeenIdent = true;
+ }
getStreamer().EmitBytes(Data, 0);
getStreamer().EmitIntValue(0, 1);
getStreamer().PopSection();