From: Simon Pilgrim Date: Fri, 28 Oct 2022 10:05:26 +0000 (+0100) Subject: IndirectBrExpandPass - remove unused DL from lambda capture. NFC. X-Git-Tag: upstream/17.0.6~29225 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=32d51581dac411c63b1f3604a6c12d2b74c10919;p=platform%2Fupstream%2Fllvm.git IndirectBrExpandPass - remove unused DL from lambda capture. NFC. Oddly I wasn't seeing an unused variable warning - this came up in a coverity remark about large copy by values! --- diff --git a/llvm/lib/CodeGen/IndirectBrExpandPass.cpp b/llvm/lib/CodeGen/IndirectBrExpandPass.cpp index 5be98e1..52a3a76 100644 --- a/llvm/lib/CodeGen/IndirectBrExpandPass.cpp +++ b/llvm/lib/CodeGen/IndirectBrExpandPass.cpp @@ -198,7 +198,7 @@ bool IndirectBrExpandPass::runOnFunction(Function &F) { CommonITy = ITy; } - auto GetSwitchValue = [DL, CommonITy](IndirectBrInst *IBr) { + auto GetSwitchValue = [CommonITy](IndirectBrInst *IBr) { return CastInst::CreatePointerCast( IBr->getAddress(), CommonITy, Twine(IBr->getAddress()->getName()) + ".switch_cast", IBr);