[llvm] r215860 - Remove unused member variable.

Rafael Espindola rafael.espindola at gmail.com
Sun Aug 17 15:48:56 PDT 2014


Author: rafael
Date: Sun Aug 17 17:48:55 2014
New Revision: 215860

URL: http://llvm.org/viewvc/llvm-project?rev=215860&view=rev
Log:
Remove unused member variable.

Modified:
    llvm/trunk/lib/MC/MCParser/AsmParser.cpp

Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=215860&r1=215859&r2=215860&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Sun Aug 17 17:48:55 2014
@@ -80,9 +80,6 @@ public:
 /// \brief Helper class for storing information about an active macro
 /// instantiation.
 struct MacroInstantiation {
-  /// The macro instantiation with substitutions.
-  MemoryBuffer *Instantiation;
-
   /// The location of the instantiation.
   SMLoc InstantiationLoc;
 
@@ -96,7 +93,7 @@ struct MacroInstantiation {
   size_t CondStackDepth;
 
 public:
-  MacroInstantiation(SMLoc IL, int EB, SMLoc EL, MemoryBuffer *I,
+  MacroInstantiation(SMLoc IL, int EB, SMLoc EL, StringRef I,
                      size_t CondStackDepth);
 };
 
@@ -1866,8 +1863,8 @@ bool AsmParser::expandMacro(raw_svector_
 }
 
 MacroInstantiation::MacroInstantiation(SMLoc IL, int EB, SMLoc EL,
-                                       MemoryBuffer *I, size_t CondStackDepth)
-    : Instantiation(I), InstantiationLoc(IL), ExitBuffer(EB), ExitLoc(EL),
+                                       StringRef I, size_t CondStackDepth)
+    : InstantiationLoc(IL), ExitBuffer(EB), ExitLoc(EL),
       CondStackDepth(CondStackDepth) {}
 
 static bool isOperator(AsmToken::TokenKind kind) {
@@ -2133,11 +2130,11 @@ bool AsmParser::handleMacroEntry(const M
   // instantiation stack.
   MacroInstantiation *MI =
       new MacroInstantiation(NameLoc, CurBuffer, getTok().getLoc(),
-                             Instantiation, TheCondStack.size());
+                             Instantiation->getBuffer(), TheCondStack.size());
   ActiveMacros.push_back(MI);
 
   // Jump to the macro instantiation and prime the lexer.
-  CurBuffer = SrcMgr.AddNewSourceBuffer(MI->Instantiation, SMLoc());
+  CurBuffer = SrcMgr.AddNewSourceBuffer(Instantiation, SMLoc());
   Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer());
   Lex();
 
@@ -4319,11 +4316,11 @@ void AsmParser::instantiateMacroLikeBody
   // instantiation stack.
   MacroInstantiation *MI =
       new MacroInstantiation(DirectiveLoc, CurBuffer, getTok().getLoc(),
-                             Instantiation, TheCondStack.size());
+                             Instantiation->getBuffer(), TheCondStack.size());
   ActiveMacros.push_back(MI);
 
   // Jump to the macro instantiation and prime the lexer.
-  CurBuffer = SrcMgr.AddNewSourceBuffer(MI->Instantiation, SMLoc());
+  CurBuffer = SrcMgr.AddNewSourceBuffer(Instantiation, SMLoc());
   Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer());
   Lex();
 }





More information about the llvm-commits mailing list