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 14 MCTargetAsmParser::MCTargetAsmParser(MCTargetOptions const &MCOptions, 15 const MCSubtargetInfo &STI) 16 : AvailableFeatures(0), ParsingInlineAsm(false), MCOptions(MCOptions), 17 STI(&STI) 18 { 19 } 20 21 MCTargetAsmParser::~MCTargetAsmParser() { 22 } 23 24 MCSubtargetInfo &MCTargetAsmParser::copySTI() { 25 MCSubtargetInfo &STICopy = getContext().getSubtargetCopy(getSTI()); 26 STI = &STICopy; 27 return STICopy; 28 } 29 30 const MCSubtargetInfo &MCTargetAsmParser::getSTI() const { 31 return *STI; 32 } 33