[llvm] 4f7dd71 - M68kInstrInfo::AnalyzeBranchImpl - fix MSVC build. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 9 03:27:38 PST 2021


Author: Simon Pilgrim
Date: 2021-03-09T11:27:26Z
New Revision: 4f7dd715b56f1633b75d80d59838d65cc2828db4

URL: https://github.com/llvm/llvm-project/commit/4f7dd715b56f1633b75d80d59838d65cc2828db4
DIFF: https://github.com/llvm/llvm-project/commit/4f7dd715b56f1633b75d80d59838d65cc2828db4.diff

LOG: M68kInstrInfo::AnalyzeBranchImpl - fix MSVC build. NFCI.

MSVC couldn't resolve the decltype of a capture of a capture - but is happy with an auto.

Added: 
    

Modified: 
    llvm/lib/Target/M68k/M68kInstrInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/M68k/M68kInstrInfo.cpp b/llvm/lib/Target/M68k/M68kInstrInfo.cpp
index 9a1eef404ca4..94b003f873f7 100644
--- a/llvm/lib/Target/M68k/M68kInstrInfo.cpp
+++ b/llvm/lib/Target/M68k/M68kInstrInfo.cpp
@@ -92,9 +92,7 @@ bool M68kInstrInfo::AnalyzeBranchImpl(MachineBasicBlock &MBB,
   std::vector<std::reference_wrapper<llvm::MachineInstr>> EraseList;
   auto FinalizeOnReturn = llvm::make_scope_exit([&EraseList] {
     std::for_each(EraseList.begin(), EraseList.end(),
-                  [](decltype(EraseList)::value_type &ref) {
-                    ref.get().eraseFromParent();
-                  });
+                  [](auto &ref) { ref.get().eraseFromParent(); });
   });
 
   // Start from the bottom of the block and work up, examining the


        


More information about the llvm-commits mailing list