Path: blob/main/contrib/llvm-project/llvm/lib/Target/AVR/AVRSubtarget.cpp
35269 views
//===-- AVRSubtarget.cpp - AVR Subtarget Information ----------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file implements the AVR specific subclass of TargetSubtargetInfo.9//10//===----------------------------------------------------------------------===//1112#include "AVRSubtarget.h"1314#include "llvm/BinaryFormat/ELF.h"15#include "llvm/MC/TargetRegistry.h"1617#include "AVR.h"18#include "AVRTargetMachine.h"19#include "MCTargetDesc/AVRMCTargetDesc.h"2021#define DEBUG_TYPE "avr-subtarget"2223#define GET_SUBTARGETINFO_TARGET_DESC24#define GET_SUBTARGETINFO_CTOR25#include "AVRGenSubtargetInfo.inc"2627namespace llvm {2829AVRSubtarget::AVRSubtarget(const Triple &TT, const std::string &CPU,30const std::string &FS, const AVRTargetMachine &TM)31: AVRGenSubtargetInfo(TT, CPU, /*TuneCPU*/ CPU, FS), InstrInfo(*this),32TLInfo(TM, initializeSubtargetDependencies(CPU, FS, TM)) {33// Parse features string.34ParseSubtargetFeatures(CPU, /*TuneCPU*/ CPU, FS);35}3637AVRSubtarget &38AVRSubtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS,39const TargetMachine &TM) {40// Parse features string.41ParseSubtargetFeatures(CPU, /*TuneCPU*/ CPU, FS);42return *this;43}4445} // end of namespace llvm464748