2017-02-10 09:33:54 +08:00
|
|
|
//===-- MCTargetAsmParser.cpp - Target Assembly Parser --------------------===//
|
2009-07-18 06:38:58 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2017-02-10 09:33:54 +08:00
|
|
|
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
|
2017-06-06 19:49:48 +08:00
|
|
|
#include "llvm/MC/MCContext.h"
|
2017-02-10 09:33:54 +08:00
|
|
|
|
2009-07-18 06:38:58 +08:00
|
|
|
using namespace llvm;
|
|
|
|
|
2015-11-14 13:20:05 +08:00
|
|
|
MCTargetAsmParser::MCTargetAsmParser(MCTargetOptions const &MCOptions,
|
2017-10-11 17:17:43 +08:00
|
|
|
const MCSubtargetInfo &STI,
|
|
|
|
const MCInstrInfo &MII)
|
|
|
|
: MCOptions(MCOptions), STI(&STI), MII(MII) {}
|
2009-07-18 06:38:58 +08:00
|
|
|
|
2017-02-10 09:33:54 +08:00
|
|
|
MCTargetAsmParser::~MCTargetAsmParser() = default;
|
2015-11-14 13:20:05 +08:00
|
|
|
|
2015-11-14 14:35:56 +08:00
|
|
|
MCSubtargetInfo &MCTargetAsmParser::copySTI() {
|
|
|
|
MCSubtargetInfo &STICopy = getContext().getSubtargetCopy(getSTI());
|
|
|
|
STI = &STICopy;
|
|
|
|
return STICopy;
|
|
|
|
}
|
|
|
|
|
2015-11-14 13:20:05 +08:00
|
|
|
const MCSubtargetInfo &MCTargetAsmParser::getSTI() const {
|
2015-11-14 14:35:56 +08:00
|
|
|
return *STI;
|
2015-11-14 13:20:05 +08:00
|
|
|
}
|