[ASan] Make insertion of version mismatch guard configurable
[llvm-core.git] / lib / MC / MCParser / MCTargetAsmParser.cpp
blob940f26d4750b4324f178fd07ed677e85e411ddd9
1 //===-- MCTargetAsmParser.cpp - Target Assembly Parser --------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "llvm/MC/MCParser/MCTargetAsmParser.h"
10 #include "llvm/MC/MCContext.h"
12 using namespace llvm;
14 MCTargetAsmParser::MCTargetAsmParser(MCTargetOptions const &MCOptions,
15 const MCSubtargetInfo &STI,
16 const MCInstrInfo &MII)
17 : MCOptions(MCOptions), STI(&STI), MII(MII) {}
19 MCTargetAsmParser::~MCTargetAsmParser() = default;
21 MCSubtargetInfo &MCTargetAsmParser::copySTI() {
22 MCSubtargetInfo &STICopy = getContext().getSubtargetCopy(getSTI());
23 STI = &STICopy;
24 return STICopy;
27 const MCSubtargetInfo &MCTargetAsmParser::getSTI() const {
28 return *STI;