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
diff --git a/tools/llvm-mc/AsmParser.h b/tools/llvm-mc/AsmParser.h
index 7471a90..7f038c9 100644
--- a/tools/llvm-mc/AsmParser.h
+++ b/tools/llvm-mc/AsmParser.h
@@ -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 MCExpr;
class MCInst;
class MCStreamer;
+class MCAsmInfo;
class MCValue;
class TargetAsmParser;
class Twine;
@@ -46,8 +48,9 @@
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();