[llvm] 93615b8 - [Debugify] Use WeakWH map collected before Pass when checking loc drop

Djordje Todorovic via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 21 06:54:56 PST 2021


Author: Djordje Todorovic
Date: 2021-12-21T15:54:09+01:00
New Revision: 93615b88f5aa1d46733c5ad92de1422a0e55c127

URL: https://github.com/llvm/llvm-project/commit/93615b88f5aa1d46733c5ad92de1422a0e55c127
DIFF: https://github.com/llvm/llvm-project/commit/93615b88f5aa1d46733c5ad92de1422a0e55c127.diff

LOG: [Debugify] Use WeakWH map collected before Pass when checking loc drop

This fixes a typo/bug when checking for pointer reuse when testing
DI location preservation in the Debugify original mode (when
checking -g generated Debug Info).

Differential Revision: https://reviews.llvm.org/D115621

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/Debugify.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/Debugify.cpp b/llvm/lib/Transforms/Utils/Debugify.cpp
index fc7083b0c30d1..589622d695780 100644
--- a/llvm/lib/Transforms/Utils/Debugify.cpp
+++ b/llvm/lib/Transforms/Utils/Debugify.cpp
@@ -596,7 +596,7 @@ bool llvm::checkDebugInfoMetadata(Module &M,
   auto DILocsBefore = DIPreservationMap[NameOfWrappedPass].DILocations;
   auto DILocsAfter = DIPreservationAfter[NameOfWrappedPass].DILocations;
 
-  auto InstToDelete = DIPreservationAfter[NameOfWrappedPass].InstToDelete;
+  auto InstToDelete = DIPreservationMap[NameOfWrappedPass].InstToDelete;
 
   auto DIVarsBefore = DIPreservationMap[NameOfWrappedPass].DIVariables;
   auto DIVarsAfter = DIPreservationAfter[NameOfWrappedPass].DIVariables;


        


More information about the llvm-commits mailing list