summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2010-01-20 22:45:23 +0000
committerSean Callanan <scallanan@apple.com>2010-01-20 22:45:23 +0000
commit10d33a4937f8449e9ca6bbb6981bb07e4fd9c781 (patch)
tree20a89f3567d0478efb58d8d50b081badf8a1a7e7 /tools
parent79036e421f22cf3f661386c560fda36aa5bd04cc (diff)
downloadexternal_llvm-10d33a4937f8449e9ca6bbb6981bb07e4fd9c781.zip
external_llvm-10d33a4937f8449e9ca6bbb6981bb07e4fd9c781.tar.gz
external_llvm-10d33a4937f8449e9ca6bbb6981bb07e4fd9c781.tar.bz2
Promoted the reference to the SourceMgr from AsmLexer
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
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-mc/AsmParser.cpp2
-rw-r--r--tools/llvm-mc/AsmParser.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/llvm-mc/AsmParser.cpp b/tools/llvm-mc/AsmParser.cpp
index eb77e8d..2cbf749 100644
--- a/tools/llvm-mc/AsmParser.cpp
+++ b/tools/llvm-mc/AsmParser.cpp
@@ -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);
diff --git a/tools/llvm-mc/AsmParser.h b/tools/llvm-mc/AsmParser.h
index f1c330c..af43f45 100644
--- a/tools/llvm-mc/AsmParser.h
+++ b/tools/llvm-mc/AsmParser.h
@@ -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;