diff options
Diffstat (limited to 'llvm/tools/llvm-mc/AsmParser.h')
-rw-r--r-- | llvm/tools/llvm-mc/AsmParser.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mc/AsmParser.h b/llvm/tools/llvm-mc/AsmParser.h index 7a4c8322e5c..c6f6f63e482 100644 --- a/llvm/tools/llvm-mc/AsmParser.h +++ b/llvm/tools/llvm-mc/AsmParser.h @@ -14,12 +14,15 @@ #ifndef ASMPARSER_H #define ASMPARSER_H +#include <vector> #include "AsmLexer.h" +#include "AsmCond.h" #include "llvm/MC/MCAsmParser.h" #include "llvm/MC/MCStreamer.h" namespace llvm { class AsmExpr; +class AsmCond; class MCContext; class MCInst; class MCStreamer; @@ -33,7 +36,10 @@ private: MCContext &Ctx; MCStreamer &Out; TargetAsmParser *TargetParser; - + + AsmCond TheCondState; + std::vector<AsmCond> TheCondStack; + public: AsmParser(SourceMgr &_SM, MCContext &_Ctx, MCStreamer &_Out) : Lexer(_SM), Ctx(_Ctx), Out(_Out), TargetParser(0) {} @@ -67,6 +73,8 @@ private: bool TokError(const char *Msg); + bool ParseConditionalAssemblyDirectives(StringRef Directive, + SMLoc DirectiveLoc); void EatToEndOfStatement(); bool ParseAssignment(const StringRef &Name, bool IsDotSet); @@ -118,6 +126,12 @@ private: bool ParseDirectiveAbort(); // ".abort" bool ParseDirectiveInclude(); // ".include" + + bool ParseDirectiveIf(SMLoc DirectiveLoc); // ".if" + bool ParseDirectiveElseIf(SMLoc DirectiveLoc); // ".elseif" + bool ParseDirectiveElse(SMLoc DirectiveLoc); // ".else" + bool ParseDirectiveEndIf(SMLoc DirectiveLoc); // .endif + }; } // end namespace llvm |