Added the AsmToken::Hash enum constant to MCAsmLexer.h in preparation of

supporting other targets.  Changed the code to pass MCAsmInfo to the parser
and the lexer.  Then changed the lexer to use CommentString from MCAsmInfo
instead of a literal '#' character.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81046 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kevin Enderby
2009-09-04 21:45:34 +00:00
parent 68f195cc50
commit 9823ca971d
5 changed files with 49 additions and 26 deletions

View File

@@ -20,6 +20,7 @@
#include "llvm/MC/MCAsmParser.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCAsmInfo.h"
namespace llvm {
class AsmCond;
@@ -27,6 +28,7 @@ class MCContext;
class MCExpr;
class MCInst;
class MCStreamer;
class MCAsmInfo;
class MCValue;
class TargetAsmParser;
class Twine;
@@ -46,8 +48,9 @@ private:
mutable void *SectionUniquingMap;
public:
AsmParser(SourceMgr &_SM, MCContext &_Ctx, MCStreamer &_Out)
: Lexer(_SM), Ctx(_Ctx), Out(_Out), TargetParser(0),
AsmParser(SourceMgr &_SM, MCContext &_Ctx, MCStreamer &_Out,
const MCAsmInfo &_MAI)
: Lexer(_SM, _MAI), Ctx(_Ctx), Out(_Out), TargetParser(0),
SectionUniquingMap(0) {}
~AsmParser();