summaryrefslogtreecommitdiff
path: root/lib/MC
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2011-02-22 16:53:11 +0000
committerJoerg Sonnenberger <joerg@bec.de>2011-02-22 16:53:11 +0000
commita04663ecb25b42b6cc588d81675d37ff8b78bfe8 (patch)
tree6e6f3bc237bf2fa0dbc7fd897a8875b5024d191f /lib/MC
parent50b284666fe2923daa4ed14a3d774cad33b54b39 (diff)
downloadllvm-a04663ecb25b42b6cc588d81675d37ff8b78bfe8.tar.gz
llvm-a04663ecb25b42b6cc588d81675d37ff8b78bfe8.tar.bz2
llvm-a04663ecb25b42b6cc588d81675d37ff8b78bfe8.tar.xz
Bug#9172: Don't use static in file scope, use an attribute on the
parser. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126225 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r--lib/MC/MCParser/ELFAsmParser.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/MC/MCParser/ELFAsmParser.cpp b/lib/MC/MCParser/ELFAsmParser.cpp
index bfaf36a451..2285a63da1 100644
--- a/lib/MC/MCParser/ELFAsmParser.cpp
+++ b/lib/MC/MCParser/ELFAsmParser.cpp
@@ -30,9 +30,10 @@ class ELFAsmParser : public MCAsmParserExtension {
bool ParseSectionSwitch(StringRef Section, unsigned Type,
unsigned Flags, SectionKind Kind);
+ bool SeenIdent;
public:
- ELFAsmParser() {}
+ ELFAsmParser() : SeenIdent(false) {}
virtual void Initialize(MCAsmParser &Parser) {
// Call the base implementation.
@@ -456,13 +457,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();