mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-05 13:29:22 +00:00
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
This commit is contained in:
parent
50b284666f
commit
a04663ecb2
@ -30,9 +30,10 @@ class ELFAsmParser : public MCAsmParserExtension {
|
|||||||
|
|
||||||
bool ParseSectionSwitch(StringRef Section, unsigned Type,
|
bool ParseSectionSwitch(StringRef Section, unsigned Type,
|
||||||
unsigned Flags, SectionKind Kind);
|
unsigned Flags, SectionKind Kind);
|
||||||
|
bool SeenIdent;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ELFAsmParser() {}
|
ELFAsmParser() : SeenIdent(false) {}
|
||||||
|
|
||||||
virtual void Initialize(MCAsmParser &Parser) {
|
virtual void Initialize(MCAsmParser &Parser) {
|
||||||
// Call the base implementation.
|
// Call the base implementation.
|
||||||
@ -456,13 +457,12 @@ bool ELFAsmParser::ParseDirectiveIdent(StringRef, SMLoc) {
|
|||||||
SectionKind::getReadOnly(),
|
SectionKind::getReadOnly(),
|
||||||
1, "");
|
1, "");
|
||||||
|
|
||||||
static bool First = true;
|
|
||||||
|
|
||||||
getStreamer().PushSection();
|
getStreamer().PushSection();
|
||||||
getStreamer().SwitchSection(Comment);
|
getStreamer().SwitchSection(Comment);
|
||||||
if (First)
|
if (!SeenIdent) {
|
||||||
getStreamer().EmitIntValue(0, 1);
|
getStreamer().EmitIntValue(0, 1);
|
||||||
First = false;
|
SeenIdent = true;
|
||||||
|
}
|
||||||
getStreamer().EmitBytes(Data, 0);
|
getStreamer().EmitBytes(Data, 0);
|
||||||
getStreamer().EmitIntValue(0, 1);
|
getStreamer().EmitIntValue(0, 1);
|
||||||
getStreamer().PopSection();
|
getStreamer().PopSection();
|
||||||
|
Loading…
Reference in New Issue
Block a user