1 //===-- MCTargetAsmParser.cpp - Target Assembly Parser ---------------------==//
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 "llvm/MC/MCContext.h"
11 #include "llvm/MC/MCTargetAsmParser.h"
12 using namespace llvm;
13 
MCTargetAsmParser(MCTargetOptions const & MCOptions,const MCSubtargetInfo & STI)14 MCTargetAsmParser::MCTargetAsmParser(MCTargetOptions const &MCOptions,
15                                      const MCSubtargetInfo &STI)
16   : AvailableFeatures(0), ParsingInlineAsm(false), MCOptions(MCOptions),
17     STI(&STI)
18 {
19 }
20 
~MCTargetAsmParser()21 MCTargetAsmParser::~MCTargetAsmParser() {
22 }
23 
copySTI()24 MCSubtargetInfo &MCTargetAsmParser::copySTI() {
25   MCSubtargetInfo &STICopy = getContext().getSubtargetCopy(getSTI());
26   STI = &STICopy;
27   return STICopy;
28 }
29 
getSTI() const30 const MCSubtargetInfo &MCTargetAsmParser::getSTI() const {
31   return *STI;
32 }
33