Move state var to private class member.
authorJim Grosbach <grosbach@apple.com>
Wed, 14 Sep 2011 16:37:04 +0000 (16:37 +0000)
committerJim Grosbach <grosbach@apple.com>
Wed, 14 Sep 2011 16:37:04 +0000 (16:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139697 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCParser/AsmLexer.h
lib/MC/MCParser/AsmLexer.cpp

index b1277ec6ef031a04538955d4abb4c4a37d1d4cec..dcecfb6aa0121618cce278ae6577aac43fd8ac1f 100644 (file)
@@ -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
index 9760e4676d8c3655a961113f344f0539c1b681fd..e446a83a58b27ad15e3d7a4b28de84fc1c1bbb21 100644 (file)
@@ -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();