[PATCH] D149762: Change if() continue; to an assert if a DBG_VALUE or DBG_VALUE_LIST returns a null DILocalVariable
Shubham Sandeep Rastogi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 3 14:19:50 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGee58f49a786d: Change if() continue; to an assert if a DBG_VALUE or DBG_VALUE_LIST returns a… (authored by rastogishubham).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149762/new/
https://reviews.llvm.org/D149762
Files:
llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
Index: llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
===================================================================
--- llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
+++ llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
@@ -2798,10 +2798,9 @@
if (MI.isDebugValue()) {
auto *DILocalVar = MI.getDebugVariable();
- // TODO: This should not happen, have to fix the MIR verifier to check for
- // such instances and fix them.
- if (!DILocalVar)
- continue;
+ assert(DILocalVar &&
+ "DBG_VALUE or DBG_VALUE_LIST must contain a DILocalVariable");
+
auto DbgVar = createDebugVariableFromMachineInstr(&MI);
// If the first operand is a register and it exists in the RegisterMap, we
// know this is a DBG_VALUE that uses the result of a load that was moved,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149762.519254.patch
Type: text/x-patch
Size: 823 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230503/cb148f50/attachment.bin>
More information about the llvm-commits
mailing list