e548391e4ccf70b1b6914bf4a2ae010879fac6fa
[oota-llvm.git] / lib / Target / X86 / AsmParser / X86AsmParser.cpp
1 //===-- X86AsmParser.cpp - Parse X86 assembly to MCInst instructions ------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #include "X86.h"
11 #include "llvm/Target/TargetRegistry.h"
12 #include "llvm/Target/TargetAsmParser.h"
13 using namespace llvm;
14
15 namespace {
16
17 class X86ATTAsmParser : public TargetAsmParser {
18  public:
19   explicit X86ATTAsmParser(const Target &);
20 };
21
22 }
23
24 X86ATTAsmParser::X86ATTAsmParser(const Target &T) 
25   : TargetAsmParser(T)
26 {
27 }
28
29 namespace {
30   TargetAsmParser *createAsmParser(const Target &T) {
31     return new X86ATTAsmParser(T);
32   }
33 }
34
35 // Force static initialization.
36 extern "C" void LLVMInitializeX86AsmParser() {
37   TargetRegistry::RegisterAsmParser(TheX86_32Target, &createAsmParser);
38   TargetRegistry::RegisterAsmParser(TheX86_64Target, &createAsmParser);
39 }