From 6148225b9590f18fcb6a1d3151d3158b316965e0 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Wed, 14 Sep 2011 16:37:04 +0000 Subject: [PATCH] Move state var to private class member. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139697 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/MC/MCParser/AsmLexer.h | 1 + lib/MC/MCParser/AsmLexer.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/llvm/MC/MCParser/AsmLexer.h b/include/llvm/MC/MCParser/AsmLexer.h index b1277ec6ef0..dcecfb6aa01 100644 --- a/include/llvm/MC/MCParser/AsmLexer.h +++ b/include/llvm/MC/MCParser/AsmLexer.h @@ -32,6 +32,7 @@ class AsmLexer : public MCAsmLexer { const char *CurPtr; const MemoryBuffer *CurBuf; + bool isAtStartOfLine; void operator=(const AsmLexer&); // DO NOT IMPLEMENT AsmLexer(const AsmLexer&); // DO NOT IMPLEMENT diff --git a/lib/MC/MCParser/AsmLexer.cpp b/lib/MC/MCParser/AsmLexer.cpp index 9760e4676d8..e446a83a58b 100644 --- a/lib/MC/MCParser/AsmLexer.cpp +++ b/lib/MC/MCParser/AsmLexer.cpp @@ -24,6 +24,7 @@ using namespace llvm; AsmLexer::AsmLexer(const MCAsmInfo &_MAI) : MAI(_MAI) { CurBuf = NULL; CurPtr = NULL; + isAtStartOfLine = true; } AsmLexer::~AsmLexer() { @@ -356,7 +357,6 @@ bool AsmLexer::isAtStatementSeparator(const char *Ptr) { } AsmToken AsmLexer::LexToken() { - static bool isAtStartOfLine = true; TokStart = CurPtr; // This always consumes at least one character. int CurChar = getNextChar(); -- 2.34.1