}
};
-bool LanaiAsmParser::ParseDirective(AsmToken DirectiveId) { return true; }
+bool LanaiAsmParser::ParseDirective(AsmToken /*DirectiveId*/) { return true; }
bool LanaiAsmParser::MatchAndEmitInstruction(SMLoc IdLoc, unsigned &Opcode,
OperandVector &Operands,
switch (MatchInstructionImpl(Operands, Inst, ErrorInfo, MatchingInlineAsm)) {
case Match_Success:
Out.EmitInstruction(Inst, SubtargetInfo);
+ Opcode = Inst.getOpcode();
return false;
case Match_MissingFeature:
return Error(IdLoc, "Instruction use requires option to be enabled");
bool LanaiAsmParser::ParseRegister(unsigned &RegNum, SMLoc &StartLoc,
SMLoc &EndLoc) {
+ const AsmToken &Tok = getParser().getTok();
+ StartLoc = Tok.getLoc();
+ EndLoc = Tok.getEndLoc();
std::unique_ptr<LanaiOperand> Op = parseRegister();
- if (Op != 0)
+ if (Op != nullptr)
RegNum = Op->getReg();
- return (Op == 0);
+ return (Op == nullptr);
}
std::unique_ptr<LanaiOperand> LanaiAsmParser::parseIdentifier() {
.Default(false);
}
-bool LanaiAsmParser::ParseInstruction(ParseInstructionInfo &Info,
+bool LanaiAsmParser::ParseInstruction(ParseInstructionInfo & /*Info*/,
StringRef Name, SMLoc NameLoc,
OperandVector &Operands) {
// First operand is token for instruction
extern Target TheLanaiTarget;
}
-static MCDisassembler *createLanaiDisassembler(const Target &T,
+static MCDisassembler *createLanaiDisassembler(const Target & /*T*/,
const MCSubtargetInfo &STI,
MCContext &Ctx) {
return new LanaiDisassembler(STI, Ctx);
#include "LanaiGenDisassemblerTables.inc"
-static DecodeStatus readInstruction32(ArrayRef<uint8_t> Bytes, uint64_t Address,
- uint64_t &Size, uint32_t &Insn) {
+static DecodeStatus readInstruction32(ArrayRef<uint8_t> Bytes, uint64_t &Size,
+ uint32_t &Insn) {
// We want to read exactly 4 bytes of data.
if (Bytes.size() < 4) {
Size = 0;
}
}
-DecodeStatus LanaiDisassembler::getInstruction(MCInst &Instr, uint64_t &Size,
- ArrayRef<uint8_t> Bytes,
- uint64_t Address,
- raw_ostream &VStream,
- raw_ostream &CStream) const {
+DecodeStatus LanaiDisassembler::getInstruction(
+ MCInst &Instr, uint64_t &Size, ArrayRef<uint8_t> Bytes, uint64_t Address,
+ raw_ostream & /*VStream*/, raw_ostream & /*CStream*/) const {
uint32_t Insn;
- DecodeStatus Result = readInstruction32(Bytes, Address, Size, Insn);
+ DecodeStatus Result = readInstruction32(Bytes, Size, Insn);
if (Result == MCDisassembler::Fail)
return MCDisassembler::Fail;
Lanai::R30, Lanai::R31};
DecodeStatus DecodeGPRRegisterClass(MCInst &Inst, unsigned RegNo,
- uint64_t Address, const void *Decoder) {
+ uint64_t /*Address*/,
+ const void * /*Decoder*/) {
if (RegNo > 31)
return MCDisassembler::Fail;
void LanaiInstPrinter::printInst(const MCInst *MI, raw_ostream &OS,
StringRef Annotation,
- const MCSubtargetInfo &STI) {
+ const MCSubtargetInfo & /*STI*/) {
if (!printAlias(MI, OS) && !printAliasInstr(MI, OS))
printInstruction(MI, OS);
printAnnotation(OS, Annotation);
void LanaiInstPrinter::printMemRiOperand(const MCInst *MI, int OpNo,
raw_ostream &OS,
- const char *Modifier) {
+ const char * /*Modifier*/) {
const MCOperand &RegOp = MI->getOperand(OpNo);
const MCOperand &OffsetOp = MI->getOperand(OpNo + 1);
const MCOperand &AluOp = MI->getOperand(OpNo + 2);
void LanaiInstPrinter::printMemRrOperand(const MCInst *MI, int OpNo,
raw_ostream &OS,
- const char *Modifier) {
+ const char * /*Modifier*/) {
const MCOperand &RegOp = MI->getOperand(OpNo);
const MCOperand &OffsetOp = MI->getOperand(OpNo + 1);
const MCOperand &AluOp = MI->getOperand(OpNo + 2);
void LanaiInstPrinter::printMemSplsOperand(const MCInst *MI, int OpNo,
raw_ostream &OS,
- const char *Modifier) {
+ const char * /*Modifier*/) {
const MCOperand &RegOp = MI->getOperand(OpNo);
const MCOperand &OffsetOp = MI->getOperand(OpNo + 1);
const MCOperand &AluOp = MI->getOperand(OpNo + 2);
const char *getPassName() const override { return "Lanai Assembly Printer"; }
- void printOperand(const MachineInstr *MI, int OpNum, raw_ostream &O,
- const char *Modifier = 0);
+ void printOperand(const MachineInstr *MI, int OpNum, raw_ostream &O);
bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
unsigned AsmVariant, const char *ExtraCode,
raw_ostream &O) override;
} // end of anonymous namespace
void LanaiAsmPrinter::printOperand(const MachineInstr *MI, int OpNum,
- raw_ostream &O, const char *Modifier) {
+ raw_ostream &O) {
const MachineOperand &MO = MI->getOperand(OpNum);
switch (MO.getType()) {
// PrintAsmOperand - Print out an operand for an inline asm expression.
bool LanaiAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
- unsigned AsmVariant,
+ unsigned /*AsmVariant*/,
const char *ExtraCode, raw_ostream &O) {
// Does this asm operand have a single letter operand modifier?
if (ExtraCode && ExtraCode[0]) {
// createLanaiDelaySlotFillerPass - Returns a pass that fills in delay
// slots in Lanai MachineFunctions
FunctionPass *
-llvm::createLanaiDelaySlotFillerPass(const LanaiTargetMachine &tm) {
+llvm::createLanaiDelaySlotFillerPass(const LanaiTargetMachine & /*tm*/) {
return new Filler();
}
}
MachineBasicBlock::iterator LanaiFrameLowering::eliminateCallFramePseudoInstr(
- MachineFunction &MF, MachineBasicBlock &MBB,
+ MachineFunction & /*MF*/, MachineBasicBlock &MBB,
MachineBasicBlock::iterator I) const {
// Discard ADJCALLSTACKDOWN, ADJCALLSTACKUP instructions.
return MBB.erase(I);
// ld -8[%fp],%fp # restore the caller's frame pointer
// before RET and the delay slot filler will move RET such that these
// instructions execute in the delay slots of the load to PC.
-void LanaiFrameLowering::emitEpilogue(MachineFunction &MF,
+void LanaiFrameLowering::emitEpilogue(MachineFunction & /*MF*/,
MachineBasicBlock &MBB) const {
MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr();
const LanaiInstrInfo &LII =
eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
MachineBasicBlock::iterator I) const override;
- bool hasFP(const MachineFunction &MF) const override { return true; }
+ bool hasFP(const MachineFunction & /*MF*/) const override { return true; }
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
RegScavenger *RS = nullptr) const override;
bool LanaiDAGToDAGISel::selectAddrRi(SDValue Addr, SDValue &Base,
SDValue &Offset, SDValue &AluOp) {
- return selectAddrRiSpls(Addr, Base, Offset, AluOp, /*RImode=*/true);
+ return selectAddrRiSpls(Addr, Base, Offset, AluOp, /*RiMode=*/true);
}
bool LanaiDAGToDAGISel::selectAddrSpls(SDValue Addr, SDValue &Base,
// Lanai Inline Assembly Support
//===----------------------------------------------------------------------===//
-unsigned LanaiTargetLowering::getRegisterByName(const char *RegName, EVT VT,
- SelectionDAG &DAG) const {
+unsigned LanaiTargetLowering::getRegisterByName(const char *RegName, EVT /*VT*/,
+ SelectionDAG & /*DAG*/) const {
// Only unallocatable registers should be matched here.
unsigned Reg = StringSwitch<unsigned>(RegName)
.Case("pc", Lanai::PC)
// (physical regs)/(stack frame), CALLSEQ_START and CALLSEQ_END are emitted.
SDValue LanaiTargetLowering::LowerCCCCallTo(
SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool IsVarArg,
- bool IsTailCall, const SmallVectorImpl<ISD::OutputArg> &Outs,
+ bool /*IsTailCall*/, const SmallVectorImpl<ISD::OutputArg> &Outs,
const SmallVectorImpl<SDValue> &OutVals,
const SmallVectorImpl<ISD::InputArg> &Ins, const SDLoc &DL,
SelectionDAG &DAG, SmallVectorImpl<SDValue> &InVals) const {
Chain = DAG.getMemcpy(Chain, DL, FIPtr, Arg, SizeNode, Align,
/*IsVolatile=*/false,
/*AlwaysInline=*/false,
- /*IsTailCall=*/false, MachinePointerInfo(),
+ /*isTailCall=*/false, MachinePointerInfo(),
MachinePointerInfo());
ByValArgs.push_back(FIPtr);
}
//===----------------------------------------------------------------------===//
static LPCC::CondCode IntCondCCodeToICC(SDValue CC, const SDLoc &DL,
- SDValue &LHS, SDValue &RHS,
- SelectionDAG &DAG) {
+ SDValue &RHS, SelectionDAG &DAG) {
ISD::CondCode SetCCOpcode = cast<CondCodeSDNode>(CC)->get();
// For integer, only the SETEQ, SETNE, SETLT, SETLE, SETGT, SETGE, SETULT,
SDValue Dest = Op.getOperand(4);
SDLoc DL(Op);
- LPCC::CondCode CC = IntCondCCodeToICC(Cond, DL, LHS, RHS, DAG);
+ LPCC::CondCode CC = IntCondCCodeToICC(Cond, DL, RHS, DAG);
SDValue TargetCC = DAG.getConstant(CC, DL, MVT::i32);
SDValue Flag =
DAG.getNode(LanaiISD::SET_FLAG, DL, MVT::Glue, LHS, RHS, TargetCC);
SDValue Cond = Op.getOperand(3);
SDLoc DL(Op);
- LPCC::CondCode CC = IntCondCCodeToICC(Cond, DL, LHS, RHS, DAG);
+ LPCC::CondCode CC = IntCondCCodeToICC(Cond, DL, RHS, DAG);
SDValue TargetCC = DAG.getConstant(CC, DL, MVT::i32);
SDValue Flag = DAG.getNode(LanaiISD::SUBBF, DL, MVT::Glue, LHS, RHS, Carry);
return DAG.getNode(LanaiISD::SETCC, DL, Op.getValueType(), TargetCC, Flag);
SDValue Cond = Op.getOperand(2);
SDLoc DL(Op);
- LPCC::CondCode CC = IntCondCCodeToICC(Cond, DL, LHS, RHS, DAG);
+ LPCC::CondCode CC = IntCondCCodeToICC(Cond, DL, RHS, DAG);
SDValue TargetCC = DAG.getConstant(CC, DL, MVT::i32);
SDValue Flag =
DAG.getNode(LanaiISD::SET_FLAG, DL, MVT::Glue, LHS, RHS, TargetCC);
SDValue Cond = Op.getOperand(4);
SDLoc DL(Op);
- LPCC::CondCode CC = IntCondCCodeToICC(Cond, DL, LHS, RHS, DAG);
+ LPCC::CondCode CC = IntCondCCodeToICC(Cond, DL, RHS, DAG);
SDValue TargetCC = DAG.getConstant(CC, DL, MVT::i32);
SDValue Flag =
DAG.getNode(LanaiISD::SET_FLAG, DL, MVT::Glue, LHS, RHS, TargetCC);
MachineBasicBlock &MBB, MachineBasicBlock::iterator Position,
unsigned SourceRegister, bool IsKill, int FrameIndex,
const TargetRegisterClass *RegisterClass,
- const TargetRegisterInfo *RegisterInfo) const {
+ const TargetRegisterInfo * /*RegisterInfo*/) const {
DebugLoc DL;
if (Position != MBB.end()) {
DL = Position->getDebugLoc();
MachineBasicBlock &MBB, MachineBasicBlock::iterator Position,
unsigned DestinationRegister, int FrameIndex,
const TargetRegisterClass *RegisterClass,
- const TargetRegisterInfo *RegisterInfo) const {
+ const TargetRegisterInfo * /*RegisterInfo*/) const {
DebugLoc DL;
if (Position != MBB.end()) {
DL = Position->getDebugLoc();
.addImm(LPAC::ADD);
}
-bool LanaiInstrInfo::areMemAccessesTriviallyDisjoint(MachineInstr &MIa,
- MachineInstr &MIb,
- AliasAnalysis *AA) const {
+bool LanaiInstrInfo::areMemAccessesTriviallyDisjoint(
+ MachineInstr &MIa, MachineInstr &MIb, AliasAnalysis * /*AA*/) const {
assert(MIa.mayLoadOrStore() && "MIa must be a load or store.");
assert(MIb.mayLoadOrStore() && "MIb must be a load or store.");
return false;
}
-bool LanaiInstrInfo::expandPostRAPseudo(MachineInstr &MI) const {
+bool LanaiInstrInfo::expandPostRAPseudo(MachineInstr & /*MI*/) const {
return false;
}
}
bool LanaiInstrInfo::optimizeCompareInstr(
- MachineInstr &CmpInstr, unsigned SrcReg, unsigned SrcReg2, int CmpMask,
+ MachineInstr &CmpInstr, unsigned SrcReg, unsigned SrcReg2, int /*CmpMask*/,
int CmpValue, const MachineRegisterInfo *MRI) const {
// Get the unique definition of SrcReg.
MachineInstr *MI = MRI->getUniqueVRegDef(SrcReg);
// Identify instructions that can be folded into a SELECT instruction, and
// return the defining instruction.
static MachineInstr *canFoldIntoSelect(unsigned Reg,
- const MachineRegisterInfo &MRI,
- const TargetInstrInfo *TII) {
+ const MachineRegisterInfo &MRI) {
if (!TargetRegisterInfo::isVirtualRegister(Reg))
return nullptr;
if (!MRI.hasOneNonDBGUse(Reg))
MachineInstr *
LanaiInstrInfo::optimizeSelect(MachineInstr &MI,
SmallPtrSetImpl<MachineInstr *> &SeenMIs,
- bool PreferFalse) const {
+ bool /*PreferFalse*/) const {
assert(MI.getOpcode() == Lanai::SELECT && "unknown select instruction");
MachineRegisterInfo &MRI = MI.getParent()->getParent()->getRegInfo();
- MachineInstr *DefMI = canFoldIntoSelect(MI.getOperand(1).getReg(), MRI, this);
+ MachineInstr *DefMI = canFoldIntoSelect(MI.getOperand(1).getReg(), MRI);
bool Invert = !DefMI;
if (!DefMI)
- DefMI = canFoldIntoSelect(MI.getOperand(2).getReg(), MRI, this);
+ DefMI = canFoldIntoSelect(MI.getOperand(2).getReg(), MRI);
if (!DefMI)
return nullptr;
return NewMI;
}
-// The AnalyzeBranch function is used to examine conditional instructions and
+// The analyzeBranch function is used to examine conditional instructions and
// remove unnecessary instructions. This method is used by BranchFolder and
// IfConverter machine function passes to improve the CFG.
// - TrueBlock is set to the destination if condition evaluates true (it is the
bool LanaiInstrInfo::getMemOpBaseRegImmOfsWidth(
MachineInstr &LdSt, unsigned &BaseReg, int64_t &Offset, unsigned &Width,
- const TargetRegisterInfo *TRI) const {
+ const TargetRegisterInfo * /*TRI*/) const {
// Handle only loads/stores with base register followed by immediate offset
// and with add as ALU op.
if (LdSt.getNumOperands() != 4)
AsmPrinter &Printer;
public:
- LanaiMCInstLower(MCContext &CTX, Mangler &Mang, AsmPrinter &AP)
+ LanaiMCInstLower(MCContext &CTX, Mangler & /*Mang*/, AsmPrinter &AP)
: Ctx(CTX), Printer(AP) {}
void Lower(const MachineInstr *MI, MCInst &OutMI) const;
LanaiRegisterInfo::LanaiRegisterInfo() : LanaiGenRegisterInfo(Lanai::RCA) {}
const uint16_t *
-LanaiRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
+LanaiRegisterInfo::getCalleeSavedRegs(const MachineFunction * /*MF*/) const {
return CSR_SaveList;
}
}
bool LanaiRegisterInfo::requiresRegisterScavenging(
- const MachineFunction &MF) const {
+ const MachineFunction & /*MF*/) const {
return true;
}
bool LanaiRegisterInfo::trackLivenessAfterRegAlloc(
- const MachineFunction &MF) const {
+ const MachineFunction & /*MF*/) const {
return true;
}
unsigned LanaiRegisterInfo::getRARegister() const { return Lanai::RCA; }
-unsigned LanaiRegisterInfo::getFrameRegister(const MachineFunction &MF) const {
+unsigned
+LanaiRegisterInfo::getFrameRegister(const MachineFunction & /*MF*/) const {
return Lanai::FP;
}
}
const uint32_t *
-LanaiRegisterInfo::getCallPreservedMask(const MachineFunction &MF,
- CallingConv::ID CC) const {
+LanaiRegisterInfo::getCallPreservedMask(const MachineFunction & /*MF*/,
+ CallingConv::ID /*CC*/) const {
return CSR_RegMask;
}
namespace llvm {
SDValue LanaiSelectionDAGInfo::EmitTargetCodeForMemcpy(
- SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Dst, SDValue Src,
- SDValue Size, unsigned Align, bool isVolatile, bool AlwaysInline,
- MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const {
+ SelectionDAG & /*DAG*/, const SDLoc & /*dl*/, SDValue /*Chain*/,
+ SDValue /*Dst*/, SDValue /*Src*/, SDValue Size, unsigned /*Align*/,
+ bool /*isVolatile*/, bool /*AlwaysInline*/,
+ MachinePointerInfo /*DstPtrInfo*/,
+ MachinePointerInfo /*SrcPtrInfo*/) const {
ConstantSDNode *ConstantSize = dyn_cast<ConstantSDNode>(Size);
if (!ConstantSize)
return SDValue();
LanaiSubtarget::LanaiSubtarget(const Triple &TargetTriple, StringRef Cpu,
StringRef FeatureString, const TargetMachine &TM,
- const TargetOptions &Options,
- CodeModel::Model CodeModel,
- CodeGenOpt::Level OptLevel)
+ const TargetOptions & /*Options*/,
+ CodeModel::Model /*CodeModel*/,
+ CodeGenOpt::Level /*OptLevel*/)
: LanaiGenSubtargetInfo(TargetTriple, Cpu, FeatureString),
FrameLowering(initializeSubtargetDependencies(Cpu, FeatureString)),
InstrInfo(), TLInfo(TM, *this), TSInfo() {}
RegisterTargetMachine<LanaiTargetMachine> registered_target(TheLanaiTarget);
}
-static std::string computeDataLayout(const Triple &TT) {
+static std::string computeDataLayout() {
// Data layout (keep in sync with clang/lib/Basic/Targets.cpp)
return "E" // Big endian
"-m:e" // ELF name manging
"-S64"; // 64 bit natural stack alignment
}
-static Reloc::Model getEffectiveRelocModel(const Triple &TT,
- Optional<Reloc::Model> RM) {
+static Reloc::Model getEffectiveRelocModel(Optional<Reloc::Model> RM) {
if (!RM.hasValue())
return Reloc::PIC_;
return *RM;
Optional<Reloc::Model> RM,
CodeModel::Model CodeModel,
CodeGenOpt::Level OptLevel)
- : LLVMTargetMachine(T, computeDataLayout(TargetTriple), TT, Cpu,
- FeatureString, Options, getEffectiveRelocModel(TT, RM),
- CodeModel, OptLevel),
+ : LLVMTargetMachine(T, computeDataLayout(), TT, Cpu, FeatureString, Options,
+ getEffectiveRelocModel(RM), CodeModel, OptLevel),
Subtarget(TT, Cpu, FeatureString, *this, Options, CodeModel, OptLevel),
TLOF(new LanaiTargetObjectFile()) {
initAsmInfo();
CodeModel::Model CodeModel, CodeGenOpt::Level OptLevel);
const LanaiSubtarget *
- getSubtargetImpl(const llvm::Function &Fn) const override {
+ getSubtargetImpl(const llvm::Function & /*Fn*/) const override {
return &Subtarget;
}
// section. This method does all the work, except for checking the section
// kind.
bool LanaiTargetObjectFile::isGlobalInSmallSectionImpl(
- const GlobalValue *GV, const TargetMachine &TM) const {
+ const GlobalValue *GV, const TargetMachine & /*TM*/) const {
// Only global variables, not functions.
const GlobalVariable *GVA = dyn_cast<GlobalVariable>(GV);
if (!GVA)
LanaiTTIImpl(const LanaiTTIImpl &Arg)
: BaseT(static_cast<const BaseT &>(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
LanaiTTIImpl(LanaiTTIImpl &&Arg)
- : BaseT(std::move(static_cast<BaseT &>(Arg))), ST(std::move(Arg.ST)),
- TLI(std::move(Arg.TLI)) {}
+ : BaseT(std::move(static_cast<BaseT &>(Arg))), ST(Arg.ST), TLI(Arg.TLI) {}
bool shouldBuildLookupTables() const { return false; }
MCObjectWriter *createObjectWriter(raw_pwrite_stream &OS) const override;
// No instruction requires relaxation
- bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value,
- const MCRelaxableFragment *DF,
- const MCAsmLayout &Layout) const override {
+ bool fixupNeedsRelaxation(const MCFixup & /*Fixup*/, uint64_t /*Value*/,
+ const MCRelaxableFragment * /*DF*/,
+ const MCAsmLayout & /*Layout*/) const override {
return false;
}
return Lanai::NumTargetFixupKinds;
}
- bool mayNeedRelaxation(const MCInst &Inst) const override { return false; }
+ bool mayNeedRelaxation(const MCInst & /*Inst*/) const override {
+ return false;
+ }
- void relaxInstruction(const MCInst &Inst, const MCSubtargetInfo &STI,
- MCInst &Res) const override {}
+ void relaxInstruction(const MCInst & /*Inst*/,
+ const MCSubtargetInfo & /*STI*/,
+ MCInst & /*Res*/) const override {}
bool writeNopData(uint64_t Count, MCObjectWriter *OW) const override;
};
}
void LanaiAsmBackend::applyFixup(const MCFixup &Fixup, char *Data,
- unsigned DataSize, uint64_t Value,
- bool IsPCRel) const {
+ unsigned /*DataSize*/, uint64_t Value,
+ bool /*IsPCRel*/) const {
MCFixupKind Kind = Fixup.getKind();
Value = adjustFixupValue(static_cast<unsigned>(Kind), Value);
} // namespace
MCAsmBackend *llvm::createLanaiAsmBackend(const Target &T,
- const MCRegisterInfo &MRI,
+ const MCRegisterInfo & /*MRI*/,
const Triple &TheTriple,
- StringRef CPU) {
+ StringRef /*CPU*/) {
if (!TheTriple.isOSBinFormatELF())
llvm_unreachable("OS not supported");
} // namespace
LanaiELFObjectWriter::LanaiELFObjectWriter(uint8_t OSABI)
- : MCELFObjectTargetWriter(/*Is64Bit=*/false, OSABI, ELF::EM_LANAI,
+ : MCELFObjectTargetWriter(/*Is64Bit_=*/false, OSABI, ELF::EM_LANAI,
/*HasRelocationAddend=*/true) {}
LanaiELFObjectWriter::~LanaiELFObjectWriter() {}
-unsigned LanaiELFObjectWriter::getRelocType(MCContext &Ctx,
- const MCValue &Target,
+unsigned LanaiELFObjectWriter::getRelocType(MCContext & /*Ctx*/,
+ const MCValue & /*Target*/,
const MCFixup &Fixup,
- bool IsPCRel) const {
+ bool /*IsPCRel*/) const {
unsigned Type;
unsigned Kind = static_cast<unsigned>(Fixup.getKind());
switch (Kind) {
return Type;
}
-bool LanaiELFObjectWriter::needsRelocateWithSymbol(const MCSymbol &SD,
+bool LanaiELFObjectWriter::needsRelocateWithSymbol(const MCSymbol & /*SD*/,
unsigned Type) const {
switch (Type) {
case ELF::R_LANAI_21:
void LanaiMCAsmInfo::anchor() {}
-LanaiMCAsmInfo::LanaiMCAsmInfo(const Triple &TheTriple) {
+LanaiMCAsmInfo::LanaiMCAsmInfo(const Triple & /*TheTriple*/) {
IsLittleEndian = false;
PrivateGlobalPrefix = ".L";
WeakRefDirective = "\t.weak\t";
llvm::MCCodeEmitter *
llvm::createLanaiMCCodeEmitter(const MCInstrInfo &InstrInfo,
- const MCRegisterInfo &MRI, MCContext &context) {
+ const MCRegisterInfo & /*MRI*/,
+ MCContext &context) {
return new LanaiMCCodeEmitter(InstrInfo, context);
}
}
// There are no TLS LanaiMCExprs at the moment.
- void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override {}
+ void fixELFSymbolsInTLSFixups(MCAssembler & /*Asm*/) const override {}
static bool classof(const MCExpr *E) {
return E->getKind() == MCExpr::Target;
return X;
}
-static MCRegisterInfo *createLanaiMCRegisterInfo(const Triple &TT) {
+static MCRegisterInfo *createLanaiMCRegisterInfo(const Triple & /*TT*/) {
MCRegisterInfo *X = new MCRegisterInfo();
InitLanaiMCRegisterInfo(X, Lanai::RCA, 0, 0, Lanai::PC);
return X;
return createELFStreamer(Context, MAB, OS, Emitter, RelaxAll);
}
-static MCInstPrinter *createLanaiMCInstPrinter(const Triple &T,
+static MCInstPrinter *createLanaiMCInstPrinter(const Triple & /*T*/,
unsigned SyntaxVariant,
const MCAsmInfo &MAI,
const MCInstrInfo &MII,