summaryrefslogtreecommitdiff
path: root/lib/Target/X86/AsmParser/X86AsmLexer.cpp
blob: 1a62044a60ef8e10bca11fd00524b6ec010ef6a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//===-- X86AsmLexer.cpp - Tokenize X86 assembly to AsmTokens --------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "llvm/Target/TargetAsmLexer.h"
#include "llvm/Target/TargetRegistry.h"
#include "llvm/MC/MCParser/MCAsmLexer.h"
#include "llvm/MC/MCParser/MCParsedAsmOperand.h"
#include "X86.h"

using namespace llvm;

namespace {
  
class X86AsmLexer : public TargetAsmLexer {
  const MCAsmInfo &AsmInfo;
protected:
  AsmToken LexToken();
public:
  X86AsmLexer(const Target &T, const MCAsmInfo &MAI)
    : TargetAsmLexer(T), AsmInfo(MAI) {
  }
};

}

AsmToken X86AsmLexer::LexToken() {
  return AsmToken(AsmToken::Error, "", 0);
}

extern "C" void LLVMInitializeX86AsmLexer() {
  RegisterAsmLexer<X86AsmLexer> X(TheX86_32Target);
  RegisterAsmLexer<X86AsmLexer> Y(TheX86_64Target);
}

//#define REGISTERS_ONLY
//#include "../X86GenAsmMatcher.inc"
//#undef REGISTERS_ONLY