Promoted the reference to the SourceMgr from AsmLexer
authorSean Callanan <scallanan@apple.com>
Wed, 20 Jan 2010 22:45:23 +0000 (22:45 +0000)
committerSean Callanan <scallanan@apple.com>
Wed, 20 Jan 2010 22:45:23 +0000 (22:45 +0000)
into AsmParser, in preparation for making AsmLexer
independent of the SourceMgr

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94043 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-mc/AsmParser.cpp
tools/llvm-mc/AsmParser.h

index eb77e8d395bd7f77874611425d50bc855488d45f..2cbf74916c5eb1eb753d0718004242675708c2a7 100644 (file)
@@ -40,7 +40,7 @@ typedef StringMap<const MCSectionMachO*> MachOUniqueMapTy;
 
 AsmParser::AsmParser(SourceMgr &_SM, MCContext &_Ctx, MCStreamer &_Out,
                      const MCAsmInfo &_MAI) 
-  : Lexer(_SM, _MAI), Ctx(_Ctx), Out(_Out), TargetParser(0),
+  : Lexer(_SM, _MAI), Ctx(_Ctx), Out(_Out), SrcMgr(_SM), TargetParser(0),
     SectionUniquingMap(0) {
   // Debugging directives.
   AddDirectiveHandler(".file", &AsmParser::ParseDirectiveFile);
index f1c330c132c37b4c1d9ab1b4c28381fc796870c5..af43f45cffa7600fb8d269d70f0a91e4db12988f 100644 (file)
@@ -32,14 +32,16 @@ class MCInst;
 class MCStreamer;
 class MCAsmInfo;
 class MCValue;
+class SourceMgr;
 class TargetAsmParser;
 class Twine;
 
 class AsmParser : public MCAsmParser {
-private:  
+private:
   AsmLexer Lexer;
   MCContext &Ctx;
   MCStreamer &Out;
+  SourceMgr &SrcMgr;
   TargetAsmParser *TargetParser;
 
   AsmCond TheCondState;