From f02c2bd152c6b5897b5320de5c67e445349fdc4b Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 8 Oct 2017 19:11:02 +0000 Subject: [PATCH] Remove unused variables. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315185 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AsmParser/LLParser.cpp | 2 -- lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 1 - lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 2 +- lib/MC/MCParser/AsmParser.cpp | 1 - lib/MC/MCParser/ELFAsmParser.cpp | 1 - lib/Support/FormatVariadic.cpp | 2 -- lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp | 2 +- lib/Target/Hexagon/HexagonISelDAGToDAG.cpp | 1 - lib/Target/Hexagon/HexagonISelLowering.cpp | 1 - lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 2 -- tools/llvm-readobj/ELFDumper.cpp | 1 - unittests/Support/BinaryStreamTest.cpp | 1 - 12 files changed, 2 insertions(+), 15 deletions(-) diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 52c5b9fb29a..b9b66ba7b2b 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -4778,7 +4778,6 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) { unsigned Alignment; std::string GC; GlobalValue::UnnamedAddr UnnamedAddr = GlobalValue::UnnamedAddr::None; - LocTy UnnamedAddrLoc; Constant *Prefix = nullptr; Constant *Prologue = nullptr; Constant *PersonalityFn = nullptr; @@ -5572,7 +5571,6 @@ bool LLParser::ParseCatchRet(Instruction *&Inst, PerFunctionState &PFS) { /// ::= 'catchswitch' within Parent bool LLParser::ParseCatchSwitch(Instruction *&Inst, PerFunctionState &PFS) { Value *ParentPad; - LocTy BBLoc; if (ParseToken(lltok::kw_within, "expected 'within' after catchswitch")) return true; diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 12942281f44..3d320a9dda7 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -3908,7 +3908,6 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode *Node) { DEBUG(dbgs() << "Trying to convert node to libcall\n"); SmallVector Results; SDLoc dl(Node); - SDValue Tmp1, Tmp2, Tmp3, Tmp4; unsigned Opc = Node->getOpcode(); switch (Opc) { case ISD::ATOMIC_FENCE: { diff --git a/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp index b2839414173..fa35b315a5b 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp @@ -1955,7 +1955,7 @@ SDValue DAGTypeLegalizer::SplitVecOp_MSCATTER(MaskedScatterSDNode *N, else std::tie(IndexLo, IndexHi) = DAG.SplitVector(Index, DL); - SDValue Lo, Hi; + SDValue Lo; MachineMemOperand *MMO = DAG.getMachineFunction(). getMachineMemOperand(N->getPointerInfo(), MachineMemOperand::MOStore, LoMemVT.getStoreSize(), diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index 9568394a364..186f33987a4 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/lib/MC/MCParser/AsmParser.cpp @@ -3617,7 +3617,6 @@ bool AsmParser::parseDirectiveCVInlineSiteId() { /// optional items are .loc sub-directives. bool AsmParser::parseDirectiveCVLoc() { SMLoc DirectiveLoc = getTok().getLoc(); - SMLoc Loc; int64_t FunctionId, FileNumber; if (parseCVFunctionId(FunctionId, ".cv_loc") || parseCVFileId(FileNumber, ".cv_loc")) diff --git a/lib/MC/MCParser/ELFAsmParser.cpp b/lib/MC/MCParser/ELFAsmParser.cpp index 8b8e96a4d51..38720c23ff2 100644 --- a/lib/MC/MCParser/ELFAsmParser.cpp +++ b/lib/MC/MCParser/ELFAsmParser.cpp @@ -488,7 +488,6 @@ bool ELFAsmParser::ParseSectionArguments(bool IsPush, SMLoc loc) { unsigned Flags = 0; const MCExpr *Subsection = nullptr; bool UseLastGroup = false; - StringRef UniqueStr; MCSymbolELF *Associated = nullptr; int64_t UniqueID = ~0; diff --git a/lib/Support/FormatVariadic.cpp b/lib/Support/FormatVariadic.cpp index de61dae814b..6dd133e6c50 100644 --- a/lib/Support/FormatVariadic.cpp +++ b/lib/Support/FormatVariadic.cpp @@ -91,8 +91,6 @@ formatv_object_base::parseReplacementItem(StringRef Spec) { std::pair formatv_object_base::splitLiteralAndReplacement(StringRef Fmt) { - StringRef Rep; - StringRef Remainder; std::size_t From = 0; while (From < Fmt.size() && From != StringRef::npos) { std::size_t BO = Fmt.find_first_of('{', From); diff --git a/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp b/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp index 1e18a5c345c..62e5d02f603 100644 --- a/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp +++ b/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp @@ -689,7 +689,7 @@ void AArch64AppleInstPrinter::printInst(const MCInst *MI, raw_ostream &O, StringRef Annot, const MCSubtargetInfo &STI) { unsigned Opcode = MI->getOpcode(); - StringRef Layout, Mnemonic; + StringRef Layout; bool IsTbx; if (isTblTbxInstruction(MI->getOpcode(), Layout, IsTbx)) { diff --git a/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp b/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp index 74405374665..2c40a1b348f 100644 --- a/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp +++ b/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp @@ -1319,7 +1319,6 @@ bool HexagonDAGToDAGISel::DetectUseSxtw(SDValue &N, SDValue &R) { if (N.getValueType() != MVT::i64) return false; - EVT SrcVT; unsigned Opc = N.getOpcode(); switch (Opc) { case ISD::SIGN_EXTEND: diff --git a/lib/Target/Hexagon/HexagonISelLowering.cpp b/lib/Target/Hexagon/HexagonISelLowering.cpp index 0d2b27f089e..ef0536a5af3 100644 --- a/lib/Target/Hexagon/HexagonISelLowering.cpp +++ b/lib/Target/Hexagon/HexagonISelLowering.cpp @@ -978,7 +978,6 @@ bool HexagonTargetLowering::getPostIndexedAddressParts(SDNode *N, SDNode *Op, SelectionDAG &DAG) const { EVT VT; - SDValue Ptr; if (LoadSDNode *LD = dyn_cast(N)) { VT = LD->getMemoryVT(); diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index 9454ed82572..8ea3689b08e 100644 --- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -579,8 +579,6 @@ bool PPCDAGToDAGISel::tryBitfieldInsert(SDNode *N) { unsigned MB, ME; if (isRunOfOnes(InsertMask, MB, ME)) { - SDValue Tmp1, Tmp2; - if ((Op1Opc == ISD::SHL || Op1Opc == ISD::SRL) && isInt32Immediate(Op1.getOperand(1), Value)) { Op1 = Op1.getOperand(0); diff --git a/tools/llvm-readobj/ELFDumper.cpp b/tools/llvm-readobj/ELFDumper.cpp index 2619121262d..037ffd2c79c 100644 --- a/tools/llvm-readobj/ELFDumper.cpp +++ b/tools/llvm-readobj/ELFDumper.cpp @@ -2396,7 +2396,6 @@ template void ELFDumper::printStackMap() const { if (!StackMapSection) return; - StringRef StackMapContents; ArrayRef StackMapContentsArray = unwrapOrError(Obj->getSectionContents(StackMapSection)); diff --git a/unittests/Support/BinaryStreamTest.cpp b/unittests/Support/BinaryStreamTest.cpp index e257583e4b1..005ec9ff58d 100644 --- a/unittests/Support/BinaryStreamTest.cpp +++ b/unittests/Support/BinaryStreamTest.cpp @@ -535,7 +535,6 @@ TEST_F(BinaryStreamTest, StreamReaderEnum) { BinaryStreamReader Reader(*Stream.Input); - ArrayRef Array; FixedStreamArray FSA; for (size_t I = 0; I < Enums.size(); ++I) { -- 2.40.0