• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/MCParser/MCTargetAsmParser.h"
11 #include "llvm/MC/MCContext.h"
12 
13 using namespace llvm;
14 
MCTargetAsmParser(MCTargetOptions const & MCOptions,const MCSubtargetInfo & STI,const MCInstrInfo & MII)15 MCTargetAsmParser::MCTargetAsmParser(MCTargetOptions const &MCOptions,
16                                      const MCSubtargetInfo &STI,
17                                      const MCInstrInfo &MII)
18     : MCOptions(MCOptions), STI(&STI), MII(MII) {}
19 
20 MCTargetAsmParser::~MCTargetAsmParser() = default;
21 
copySTI()22 MCSubtargetInfo &MCTargetAsmParser::copySTI() {
23   MCSubtargetInfo &STICopy = getContext().getSubtargetCopy(getSTI());
24   STI = &STICopy;
25   return STICopy;
26 }
27 
getSTI() const28 const MCSubtargetInfo &MCTargetAsmParser::getSTI() const {
29   return *STI;
30 }
31