[llvm-commits] [llvm] r126225 - /llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp
Joerg Sonnenberger
joerg at bec.de
Tue Feb 22 08:53:11 PST 2011
Author: joerg
Date: Tue Feb 22 10:53:11 2011
New Revision: 126225
URL: http://llvm.org/viewvc/llvm-project?rev=126225&view=rev
Log:
Bug#9172: Don't use static in file scope, use an attribute on the
parser.
Modified:
llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp
Modified: llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp?rev=126225&r1=126224&r2=126225&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp Tue Feb 22 10:53:11 2011
@@ -30,9 +30,10 @@
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 @@
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();
More information about the llvm-commits
mailing list