[llvm] 32d5158 - IndirectBrExpandPass - remove unused DL from lambda capture. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 03:08:44 PDT 2022


Author: Simon Pilgrim
Date: 2022-10-28T11:05:42+01:00
New Revision: 32d51581dac411c63b1f3604a6c12d2b74c10919

URL: https://github.com/llvm/llvm-project/commit/32d51581dac411c63b1f3604a6c12d2b74c10919
DIFF: https://github.com/llvm/llvm-project/commit/32d51581dac411c63b1f3604a6c12d2b74c10919.diff

LOG: 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!

Added: 
    

Modified: 
    llvm/lib/CodeGen/IndirectBrExpandPass.cpp

Removed: 
    


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


        


More information about the llvm-commits mailing list