diff --git a/llvm/lib/CodeGen/IndirectBrExpandPass.cpp b/llvm/lib/CodeGen/IndirectBrExpandPass.cpp index 5be98e11467331..52a3a76c581d4d 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);