2011-07-26 08:24:13 +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.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2015-11-14 13:20:05 +08:00
|
|
|
#include "llvm/MC/MCContext.h"
|
2011-07-26 08:24:13 +08:00
|
|
|
#include "llvm/MC/MCTargetAsmParser.h"
|
2009-07-18 06:38:58 +08:00
|
|
|
using namespace llvm;
|
|
|
|
|
2015-11-14 13:20:05 +08:00
|
|
|
MCTargetAsmParser::MCTargetAsmParser(MCTargetOptions const &MCOptions,
|
2015-11-14 14:35:56 +08:00
|
|
|
const MCSubtargetInfo &STI)
|
2015-11-14 13:20:05 +08:00
|
|
|
: AvailableFeatures(0), ParsingInlineAsm(false), MCOptions(MCOptions),
|
2015-11-14 14:35:56 +08:00
|
|
|
STI(&STI)
|
2009-07-18 06:38:58 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2011-07-26 08:24:13 +08:00
|
|
|
MCTargetAsmParser::~MCTargetAsmParser() {
|
2009-07-18 06:38:58 +08:00
|
|
|
}
|
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
|
|
|
}
|