diff --git a/llvm/lib/Object/Object.cpp b/llvm/lib/Object/Object.cpp index d5e67160dfa36..c62944ad3eeba 100644 --- a/llvm/lib/Object/Object.cpp +++ b/llvm/lib/Object/Object.cpp @@ -182,7 +182,6 @@ LLVMObjectFileRef LLVMCreateObjectFile(LLVMMemoryBufferRef MemBuf) { std::unique_ptr Buf(unwrap(MemBuf)); Expected> ObjOrErr( ObjectFile::createObjectFile(Buf->getMemBufferRef())); - std::unique_ptr Obj; if (!ObjOrErr) { // TODO: Actually report errors helpfully. consumeError(ObjOrErr.takeError()); diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp index aac68b32da13a..aac3473311192 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp @@ -2871,7 +2871,6 @@ SDValue WebAssemblyTargetLowering::LowerShift(SDValue Op, SDValue WebAssemblyTargetLowering::LowerFP_TO_INT_SAT(SDValue Op, SelectionDAG &DAG) const { - SDLoc DL(Op); EVT ResT = Op.getValueType(); EVT SatVT = cast(Op.getOperand(1))->getVT(); diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 6b4b4beb97ca5..96219c51d4bb6 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -53260,7 +53260,6 @@ static SDValue combineMaskedStore(SDNode *N, SelectionDAG &DAG, return SDValue(); EVT VT = Mst->getValue().getValueType(); - SDLoc dl(Mst); const TargetLowering &TLI = DAG.getTargetLoweringInfo(); if (Mst->isTruncatingStore()) diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp index e2eb21058c2d6..4b0611186d21f 100644 --- a/llvm/tools/llvm-mca/llvm-mca.cpp +++ b/llvm/tools/llvm-mca/llvm-mca.cpp @@ -454,8 +454,6 @@ int main(int argc, char **argv) { // Tell SrcMgr about this buffer, which is what the parser will pick up. SrcMgr.AddNewSourceBuffer(std::move(*BufferPtr), SMLoc()); - std::unique_ptr BOS; - std::unique_ptr MCII(TheTarget->createMCInstrInfo()); assert(MCII && "Unable to create instruction info!"); diff --git a/llvm/tools/llvm-rc/ResourceFileWriter.cpp b/llvm/tools/llvm-rc/ResourceFileWriter.cpp index 85b59532bb83b..dc21f63a682aa 100644 --- a/llvm/tools/llvm-rc/ResourceFileWriter.cpp +++ b/llvm/tools/llvm-rc/ResourceFileWriter.cpp @@ -1573,7 +1573,6 @@ Expected> ResourceFileWriter::loadFile(StringRef File) const { SmallString<128> Path; SmallString<128> Cwd; - std::unique_ptr Result; // 0. The file path is absolute or has a root directory, so we shouldn't // try to append it on top of other base directories. (An absolute path