Skip to content

Commit

Permalink
[LoongArch] Fix several Clang warnings. NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Mar 26, 2022
1 parent bf11ed2 commit 88436af
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 13 deletions.
5 changes: 1 addition & 4 deletions llvm/lib/Target/LoongArch/AsmParser/LoongArchAsmParser.cpp
Expand Up @@ -24,8 +24,6 @@ using namespace llvm;
#define DEBUG_TYPE "loongarch-asm-parser"

namespace {
struct LoongArchOperand;

class LoongArchAsmParser : public MCTargetAsmParser {
SMLoc getLoc() const { return getParser().getTok().getLoc(); }

Expand Down Expand Up @@ -82,8 +80,7 @@ class LoongArchAsmParser : public MCTargetAsmParser {
}
};

/// LoongArchOperand - Instances of this class represent a parsed LoongArch
/// machine instruction.
// Instances of this class represent a parsed LoongArch machine instruction.
class LoongArchOperand : public MCParsedAsmOperand {
enum class KindTy {
Token,
Expand Down
4 changes: 1 addition & 3 deletions llvm/lib/Target/LoongArch/LoongArchInstrInfo.cpp
Expand Up @@ -19,6 +19,4 @@ using namespace llvm;

LoongArchInstrInfo::LoongArchInstrInfo(LoongArchSubtarget &STI)
// FIXME: add CFSetup and CFDestroy Inst when we implement function call.
: LoongArchGenInstrInfo(),

STI(STI) {}
: LoongArchGenInstrInfo() {}
2 changes: 0 additions & 2 deletions llvm/lib/Target/LoongArch/LoongArchInstrInfo.h
Expand Up @@ -23,8 +23,6 @@ namespace llvm {
class LoongArchSubtarget;

class LoongArchInstrInfo : public LoongArchGenInstrInfo {
const LoongArchSubtarget &STI;

public:
explicit LoongArchInstrInfo(LoongArchSubtarget &STI);
};
Expand Down
4 changes: 1 addition & 3 deletions llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.h
Expand Up @@ -22,14 +22,12 @@
namespace llvm {

class LoongArchAsmBackend : public MCAsmBackend {
const MCSubtargetInfo &STI;
uint8_t OSABI;
bool Is64Bit;

public:
LoongArchAsmBackend(const MCSubtargetInfo &STI, uint8_t OSABI, bool Is64Bit)
: MCAsmBackend(support::little), STI(STI), OSABI(OSABI),
Is64Bit(Is64Bit) {}
: MCAsmBackend(support::little), OSABI(OSABI), Is64Bit(Is64Bit) {}
~LoongArchAsmBackend() override {}

void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
Expand Down
Expand Up @@ -45,7 +45,6 @@ unsigned LoongArchELFObjectWriter::getRelocType(MCContext &Ctx,
const MCValue &Target,
const MCFixup &Fixup,
bool IsPCRel) const {
const MCExpr *Expr = Fixup.getValue();
// Determine the type of the relocation
unsigned Kind = Fixup.getTargetKind();

Expand Down

0 comments on commit 88436af

Please sign in to comment.